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 CHANGED
@@ -1 +1,2 @@
1
+ v0.1.1. overflow and g++ 4.3 fixes
1
2
  v0.1.0. initial release
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.0') do |p|
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"
@@ -10,6 +10,7 @@
10
10
  /* */
11
11
  /*******************************************************************/
12
12
 
13
+ #include <limits.h>
13
14
  #include "utf8.h"
14
15
  #include "alphabet.h"
15
16
 
@@ -13,6 +13,7 @@
13
13
  #define _ALPHABET_H_
14
14
 
15
15
  #include <stdio.h>
16
+ #include <string.h>
16
17
 
17
18
  #include "basic.h"
18
19
 
@@ -25,7 +25,7 @@
25
25
 
26
26
  #include "mem.h"
27
27
 
28
- typedef unsigned short VType;
28
+ typedef unsigned long VType;
29
29
 
30
30
  extern int Quiet;
31
31
 
@@ -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 c, Character c );
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.0"
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-08-04}
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.0
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-08-04 00:00:00 +02:00
12
+ date: 2008-11-06 00:00:00 +00:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency