ruby-sfst 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +1 -0
- data/Rakefile +1 -1
- data/ext/sfst_machine/alphabet.C +1 -0
- data/ext/sfst_machine/alphabet.h +1 -0
- data/ext/sfst_machine/fst.h +1 -1
- data/ext/sfst_machine/interface.h +1 -1
- data/ruby-sfst.gemspec +2 -2
- data/test/test_sfst.rb +21 -0
- metadata +2 -2
data/CHANGELOG
CHANGED
data/Rakefile
CHANGED
@@ -4,7 +4,7 @@ require 'rake'
|
|
4
4
|
begin
|
5
5
|
require 'echoe'
|
6
6
|
|
7
|
-
Echoe.new('ruby-sfst', '0.1.
|
7
|
+
Echoe.new('ruby-sfst', '0.1.1') do |p|
|
8
8
|
p.summary = "A wrapper for the Stuttgart Finite State Transducer Tools (SFST)."
|
9
9
|
p.author = 'Marius L. Jøhndal'
|
10
10
|
p.email = "mariuslj (at) ifi [dot] uio (dot) no"
|
data/ext/sfst_machine/alphabet.C
CHANGED
data/ext/sfst_machine/alphabet.h
CHANGED
data/ext/sfst_machine/fst.h
CHANGED
@@ -83,7 +83,7 @@ Transducer *repetition2( Transducer *a );
|
|
83
83
|
Transducer *optional( Transducer *a );
|
84
84
|
Transducer *make_rule( Transducer *lc, Range *r1, Twol_Type type,
|
85
85
|
Range *r2, Transducer *rc );
|
86
|
-
Transducer *freely_insert( Transducer *a, Character
|
86
|
+
Transducer *freely_insert( Transducer *a, Character lc, Character uc );
|
87
87
|
Transducer *make_mapping( Ranges*, Ranges* );
|
88
88
|
Ranges *add_range( Range*, Ranges* );
|
89
89
|
Contexts *make_context( Transducer *l, Transducer *r );
|
data/ruby-sfst.gemspec
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = %q{ruby-sfst}
|
3
|
-
s.version = "0.1.
|
3
|
+
s.version = "0.1.1"
|
4
4
|
|
5
5
|
s.required_rubygems_version = Gem::Requirement.new("= 1.2") if s.respond_to? :required_rubygems_version=
|
6
6
|
s.authors = ["Marius L. J\303\270hndal"]
|
7
|
-
s.date = %q{2008-
|
7
|
+
s.date = %q{2008-11-06}
|
8
8
|
s.description = %q{A wrapper for the Stuttgart Finite State Transducer Tools (SFST).}
|
9
9
|
s.email = %q{mariuslj (at) ifi [dot] uio (dot) no}
|
10
10
|
s.extensions = ["ext/sfst_machine/extconf.rb"]
|
data/test/test_sfst.rb
CHANGED
@@ -117,3 +117,24 @@ class CompactTransducerTestCase < Test::Unit::TestCase
|
|
117
117
|
assert_equal [], fst.analyse('fox').sort
|
118
118
|
end
|
119
119
|
end
|
120
|
+
|
121
|
+
class StressTestCase < Test::Unit::TestCase
|
122
|
+
def setup
|
123
|
+
SFST::compile(TEST_SCRIPT_FILE, TEST_COMPILED_REGULAR_FILE, :compact => false)
|
124
|
+
SFST::compile(TEST_SCRIPT_FILE, TEST_COMPILED_COMPACT_FILE, :compact => true)
|
125
|
+
end
|
126
|
+
|
127
|
+
def test_repeated_analyses_regular
|
128
|
+
fst = SFST::RegularTransducer.new(TEST_COMPILED_REGULAR_FILE)
|
129
|
+
65536.times do
|
130
|
+
assert_equal ['bar', 'baz'], fst.analyse('foo').sort
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
134
|
+
def test_repeated_analyses_compact
|
135
|
+
fst = SFST::CompactTransducer.new(TEST_COMPILED_COMPACT_FILE)
|
136
|
+
65536.times do
|
137
|
+
assert_equal ['bar', 'baz'], fst.analyse('foo').sort
|
138
|
+
end
|
139
|
+
end
|
140
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-sfst
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- "Marius L. J\xC3\xB8hndal"
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-
|
12
|
+
date: 2008-11-06 00:00:00 +00:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|