Commit 55d227bb authored by alexlag's avatar alexlag
Browse files

pos fix, more tests

parent bcf493d6
......@@ -14,7 +14,7 @@ module TexterraNLP
#
# @param [String] text Text to process
# @return [Array] Texterra annotations
def sentence_detection(text)
def sentence_detection_annotate(text)
presetNLP(:sentenceDetection, text)
end
......
......@@ -32,7 +32,7 @@ module TexterraNLPSpecs
posTagging: {
path: 'nlp/pos',
params: {
:class => 'ru.ispras.texterra.core.nlp.datamodel.pos.IPOSToken',
:class => 'ru.ispras.texterra.core.nlp.datamodel.pos.POSToken',
filtering: 'KEEPING'
}
},
......
......@@ -2,12 +2,12 @@ module Version
MAJOR = 0
MINOR = 1
PATCH = 2
PATCH = 3
PRE = nil
YEAR = "2015"
MONTH = "02"
DAY = "11"
DAY = "12"
def self.to_s
[MAJOR, MINOR, PATCH, PRE].compact.join(".")
......
......@@ -57,6 +57,34 @@ class TestTexterraAPI < Minitest::Test
assert_instance_of Array, @texterra.language_detection_annotate(@ru_tweet)
end
def test_sentence_detection_annotate
assert_instance_of Array, @texterra.sentence_detection_annotate(@en_text)
assert_instance_of Array, @texterra.sentence_detection_annotate(@ru_text)
assert_instance_of Array, @texterra.sentence_detection_annotate(@en_tweet)
assert_instance_of Array, @texterra.sentence_detection_annotate(@ru_tweet)
end
def test_tokenization_annotate
assert_instance_of Array, @texterra.tokenization_annotate(@en_text)
assert_instance_of Array, @texterra.tokenization_annotate(@ru_text)
assert_instance_of Array, @texterra.tokenization_annotate(@en_tweet)
assert_instance_of Array, @texterra.tokenization_annotate(@ru_tweet)
end
def test_lemmatization_annotate
assert_instance_of Array, @texterra.lemmatization_annotate(@en_text)
assert_instance_of Array, @texterra.lemmatization_annotate(@ru_text)
assert_instance_of Array, @texterra.lemmatization_annotate(@en_tweet)
assert_instance_of Array, @texterra.lemmatization_annotate(@ru_tweet)
end
def test_pos_tagging_annotate
assert_instance_of Array, @texterra.pos_tagging_annotate(@en_text)
assert_instance_of Array, @texterra.pos_tagging_annotate(@ru_text)
assert_instance_of Array, @texterra.pos_tagging_annotate(@en_tweet)
assert_instance_of Array, @texterra.pos_tagging_annotate(@ru_tweet)
end
def test_named_entities_annotate
assert_instance_of Array, @texterra.named_entities_annotate(@en_text)
assert_instance_of Array, @texterra.named_entities_annotate(@ru_text)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment