Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISPRAS API
sdk.ruby
Commits
55d227bb
Commit
55d227bb
authored
Feb 12, 2015
by
alexlag
Browse files
pos fix, more tests
parent
bcf493d6
Changes
4
Hide whitespace changes
Inline
Side-by-side
lib/ispras-api/texterra/nlp.rb
View file @
55d227bb
...
...
@@ -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
...
...
lib/ispras-api/texterra/nlp_specs.rb
View file @
55d227bb
...
...
@@ -32,7 +32,7 @@ module TexterraNLPSpecs
posTagging:
{
path:
'nlp/pos'
,
params:
{
:class
=>
'ru.ispras.texterra.core.nlp.datamodel.pos.
I
POSToken'
,
:class
=>
'ru.ispras.texterra.core.nlp.datamodel.pos.POSToken'
,
filtering:
'KEEPING'
}
},
...
...
lib/ispras-api/version.rb
View file @
55d227bb
...
...
@@ -2,12 +2,12 @@ module Version
MAJOR
=
0
MINOR
=
1
PATCH
=
2
PATCH
=
3
PRE
=
nil
YEAR
=
"2015"
MONTH
=
"02"
DAY
=
"1
1
"
DAY
=
"1
2
"
def
self
.
to_s
[
MAJOR
,
MINOR
,
PATCH
,
PRE
].
compact
.
join
(
"."
)
...
...
test/test_texterra_api.rb
View file @
55d227bb
...
...
@@ -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
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment