llt-tokenizer 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config.ru +2 -0
- data/lib/llt/token/xml_tag.rb +2 -2
- data/lib/llt/tokenizer.rb +8 -1
- data/lib/llt/tokenizer/version.rb +1 -1
- data/spec/lib/llt/tokenizer_spec.rb +7 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e46c64430c5caec2c91a4bb82b4322a9b02579a
|
4
|
+
data.tar.gz: 2f746527437f1bdbd683e0033a2597300f7635d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7366d89f3b48de21d266368690cfb927dbb408df562f5b677d87c632f3c5081972d87fd0be2c2da74149936915e03c10873bd881a33fe4198ea766a1d3197279
|
7
|
+
data.tar.gz: cd55bd5af33d9cf077228ccb08559ad2fea87329d2982bf32fcdb31f11cc851255e9b26ed315058858ad44f722c535378d26018a0dec1f5d0e2982c1d96b47c5
|
data/config.ru
ADDED
data/lib/llt/token/xml_tag.rb
CHANGED
@@ -5,7 +5,7 @@ module LLT
|
|
5
5
|
[:xml_tag]
|
6
6
|
end
|
7
7
|
|
8
|
-
# overrides #to_xml from Containable - the tag stays
|
8
|
+
# overrides #to_xml from Containable - the tag stays as it is
|
9
9
|
def to_xml(*args)
|
10
10
|
to_s
|
11
11
|
end
|
@@ -17,7 +17,7 @@ module LLT
|
|
17
17
|
private
|
18
18
|
|
19
19
|
def tag_status
|
20
|
-
to_s.match(/\//) ? '
|
20
|
+
to_s.match(/\//) ? 'close' : 'open'
|
21
21
|
end
|
22
22
|
end
|
23
23
|
end
|
data/lib/llt/tokenizer.rb
CHANGED
@@ -245,11 +245,18 @@ module LLT
|
|
245
245
|
entries += lookup(orig_el + "n", :persona, :stem) if orig_el =~ /o$/ # Plato-ne Cicero-ne Solo-ne
|
246
246
|
entries += lookup(orig_el + "n", :noun, :stem) if orig_el =~ /d?i$/ # fortitudi-ne ratio-ne libidi-ne homi-ne
|
247
247
|
entries += lookup(orig_el + "n", :noun, :stem) if orig_el =~ /mi$/ # flumi-ne agmi-ne
|
248
|
-
entries += lookup(orig_el + "n", :
|
248
|
+
entries += lookup(orig_el + "n", :noun, :stem, 2) # domi-ne
|
249
|
+
entries += lookup(orig_el + "n", :adjective, :stem, [1,3]) # communis commune, or bonus
|
250
|
+
|
251
|
+
entries += lookup(orig_el + "n", :persona, :stem, 2) # Pauli-ne
|
249
252
|
|
250
253
|
if entries.any?(&:third_decl_with_possible_ne_abl?)
|
251
254
|
corrections << i - corrections.size
|
252
255
|
end
|
256
|
+
|
257
|
+
if entries.any?(&:o_decl_with_possible_ne_voc?)
|
258
|
+
corrections << i - corrections.size
|
259
|
+
end
|
253
260
|
end
|
254
261
|
end
|
255
262
|
|
@@ -207,6 +207,13 @@ describe LLT::Tokenizer do
|
|
207
207
|
|
208
208
|
# ne itself should be contained
|
209
209
|
"ne" => "ne",
|
210
|
+
|
211
|
+
# nouns in vocative in o declension
|
212
|
+
"Pauline" => "Pauline",
|
213
|
+
"domine" => "domine",
|
214
|
+
|
215
|
+
# adjective in vocative in a/o declension
|
216
|
+
"bone" => "bone",
|
210
217
|
}
|
211
218
|
|
212
219
|
examples.each do |example, expected|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: llt-tokenizer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- LFDM
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-02-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -150,6 +150,7 @@ files:
|
|
150
150
|
- LICENSE.txt
|
151
151
|
- README.md
|
152
152
|
- Rakefile
|
153
|
+
- config.ru
|
153
154
|
- lib/llt/token.rb
|
154
155
|
- lib/llt/token/filler.rb
|
155
156
|
- lib/llt/token/punctuation.rb
|