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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 75d2abc5e72328a1b4ef2f224931c0656572e71d
4
- data.tar.gz: b1b155c05e45b87cfec7f0eb4e1535d9f72783b5
3
+ metadata.gz: 3e46c64430c5caec2c91a4bb82b4322a9b02579a
4
+ data.tar.gz: 2f746527437f1bdbd683e0033a2597300f7635d1
5
5
  SHA512:
6
- metadata.gz: 1a7f8fbd9be93c7053fe601243d6ea4c3a603b0c1643a5f102727844ae06c6083acbeb805bdf74e870c5ceb9c92e9dfdd796b8b201a434f50ef50d532fb65a93
7
- data.tar.gz: 37d6ab4e7e39a30b6165e61e0a4d341e4620de0a90521bb17ac8ce141356dbe2dc3a952d39d57dd1e4c90eba224f9077b2bc12ecd5d818c8c9372734c91593fa
6
+ metadata.gz: 7366d89f3b48de21d266368690cfb927dbb408df562f5b677d87c632f3c5081972d87fd0be2c2da74149936915e03c10873bd881a33fe4198ea766a1d3197279
7
+ data.tar.gz: cd55bd5af33d9cf077228ccb08559ad2fea87329d2982bf32fcdb31f11cc851255e9b26ed315058858ad44f722c535378d26018a0dec1f5d0e2982c1d96b47c5
data/config.ru ADDED
@@ -0,0 +1,2 @@
1
+ require 'llt/tokenizer/api'
2
+ run Api
@@ -5,7 +5,7 @@ module LLT
5
5
  [:xml_tag]
6
6
  end
7
7
 
8
- # overrides #to_xml from Containable - the tag stays at is it
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(/\//) ? 'open' : 'close'
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", :adjective, :stem) # communis commune
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
 
@@ -1,5 +1,5 @@
1
1
  module LLT
2
2
  class Tokenizer
3
- VERSION = "0.0.3"
3
+ VERSION = "0.0.4"
4
4
  end
5
5
  end
@@ -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.3
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-01-27 00:00:00.000000000 Z
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