-
-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
owbasevectorizer - computation in the tread
- Loading branch information
1 parent
4c38b3f
commit c809707
Showing
8 changed files
with
126 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import unittest | ||
|
||
from Orange.widgets.tests.base import WidgetTest | ||
|
||
from orangecontrib.text.corpus import Corpus | ||
from orangecontrib.text.widgets.owsimhash import OWSimhash | ||
|
||
|
||
class TestOWSimhash(WidgetTest): | ||
def setUp(self): | ||
self.widget = self.create_widget(OWSimhash) | ||
self.corpus = Corpus.from_file("deerwester") | ||
|
||
def test_corpus(self): | ||
""" | ||
Just basic test. | ||
GH-247 | ||
""" | ||
self.send_signal("Corpus", self.corpus) | ||
self.send_signal("Corpus", None) | ||
|
||
def test_output(self): | ||
self.send_signal("Corpus", self.corpus) | ||
output = self.get_output(self.widget.Outputs.corpus) | ||
self.assertEqual(len(self.corpus), len(output)) | ||
self.assertEqual(64, len(output.domain.attributes)) | ||
|
||
|
||
if __name__ == "__main__": | ||
unittest.main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters