test_lang_guessing
Test language recognition.
TestTextCat
Bases: unittest.TestCase
Test frases collected from nrk.no article collection.
Source code in /home/anders/projects/CorpusTools/corpustools/test/test_lang_guessing.py
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
|
setUp()
Set up common resource.
Source code in /home/anders/projects/CorpusTools/corpustools/test/test_lang_guessing.py
93 94 95 |
|
test_langid(input_text)
Test language recognition on input strings.
The input strings have been classified as sme, while they in fact are nob.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
input_text |
str
|
text that should be classified by the language guesser. |
required |
Source code in /home/anders/projects/CorpusTools/corpustools/test/test_lang_guessing.py
110 111 112 113 114 115 116 117 118 119 120 121 |
|
test_textcat(input_text)
Test language recognition on input strings.
The input strings have been classified as sme, while they in fact are nob.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
input_text |
str
|
text that should be classified by the language guesser. |
required |
Source code in /home/anders/projects/CorpusTools/corpustools/test/test_lang_guessing.py
97 98 99 100 101 102 103 104 105 106 107 108 |
|