ruby-sfst 0.3.0 → 0.3.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 -0
- data/VERSION +1 -1
- data/ext/sfst_machine/fst.C +4 -4
- data/ext/sfst_machine/sfst_machine.cc +5 -5
- data/ruby-sfst.gemspec +5 -4
- metadata +21 -39
data/CHANGELOG
CHANGED
data/Rakefile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.1
|
data/ext/sfst_machine/fst.C
CHANGED
@@ -439,14 +439,14 @@ void Transducer::enumerate_paths_node( Node *node, vector<Label> &path,
|
|
439
439
|
if (node->is_final())
|
440
440
|
result.push_back(new Transducer(path));
|
441
441
|
|
442
|
-
for( ArcsIter
|
443
|
-
Arc *arc=
|
442
|
+
for( ArcsIter it_arc(node->arcs()); it_arc; it_arc++ ) {
|
443
|
+
Arc *arc=it_arc;
|
444
444
|
|
445
|
-
NodeHashSet::iterator
|
445
|
+
NodeHashSet::iterator it_node=previous.insert(node).first;
|
446
446
|
path.push_back(arc->label());
|
447
447
|
enumerate_paths_node( arc->target_node(), path, previous, result );
|
448
448
|
path.pop_back();
|
449
|
-
previous.erase(
|
449
|
+
previous.erase(it_node);
|
450
450
|
}
|
451
451
|
}
|
452
452
|
|
@@ -53,7 +53,7 @@ static VALUE compile(char *from_filename, char *to_filename, bool compact) // :n
|
|
53
53
|
fclose(out_file);
|
54
54
|
}
|
55
55
|
catch(const char* p) {
|
56
|
-
rb_raise(rb_eRuntimeError, p);
|
56
|
+
rb_raise(rb_eRuntimeError, "%s", p);
|
57
57
|
}
|
58
58
|
|
59
59
|
return Qnil;
|
@@ -206,7 +206,7 @@ static VALUE rb_ary_push_pair(VALUE ary, VALUE a, VALUE b)
|
|
206
206
|
return ary;
|
207
207
|
}
|
208
208
|
|
209
|
-
static void _regular_transducer_generate(Transducer *t, Node *node,
|
209
|
+
static void _regular_transducer_generate(Transducer *t, Node *node,
|
210
210
|
Node2Int &visitations, VALUE a, int mode, bool epsilons)
|
211
211
|
{
|
212
212
|
if (node->is_final())
|
@@ -221,7 +221,7 @@ static void _regular_transducer_generate(Transducer *t, Node *node,
|
|
221
221
|
size_t i;
|
222
222
|
for (i = 0; i < arc.size(); i++)
|
223
223
|
if (visitations[n] < visitations[arc[i]->target_node()])
|
224
|
-
|
224
|
+
break;
|
225
225
|
arc.push_back(NULL);
|
226
226
|
for (size_t k = arc.size() - 1; k > i; k--)
|
227
227
|
arc[k] = arc[k - 1];
|
@@ -299,7 +299,7 @@ static VALUE regular_transducer_generate_language(VALUE self, VALUE levels_arg,
|
|
299
299
|
rb_raise(rb_eRuntimeError, "invalid mode");
|
300
300
|
|
301
301
|
if (!rb_block_given_p())
|
302
|
-
rb_raise(rb_eRuntimeError, "block expected");
|
302
|
+
rb_raise(rb_eRuntimeError, "block expected");
|
303
303
|
|
304
304
|
Node2Int visitations;
|
305
305
|
Transducer *a2;
|
@@ -314,7 +314,7 @@ static VALUE regular_transducer_generate_language(VALUE self, VALUE levels_arg,
|
|
314
314
|
a2 = t;
|
315
315
|
break;
|
316
316
|
}
|
317
|
-
_regular_transducer_generate(a2, a2->root_node(), visitations, rb_ary_new(),
|
317
|
+
_regular_transducer_generate(a2, a2->root_node(), visitations, rb_ary_new(),
|
318
318
|
levels, epsilons);
|
319
319
|
|
320
320
|
return Qnil;
|
data/ruby-sfst.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "ruby-sfst"
|
8
|
-
s.version = "0.3.
|
8
|
+
s.version = "0.3.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
-
s.authors = ["Marius L. J\
|
12
|
-
s.date = "
|
11
|
+
s.authors = ["Marius L. J\u{f8}hndal"]
|
12
|
+
s.date = "2013-04-09"
|
13
13
|
s.description = "A wrapper for the Stuttgart Finite State Transducer Tools (SFST)."
|
14
14
|
s.email = "mariuslj (at) ifi [dot] uio (dot) no"
|
15
15
|
s.extensions = ["ext/sfst_machine/extconf.rb"]
|
@@ -50,6 +50,7 @@ Gem::Specification.new do |s|
|
|
50
50
|
"ext/sfst_machine/utf8.h",
|
51
51
|
"lib/.gitignore",
|
52
52
|
"lib/sfst.rb",
|
53
|
+
"ruby-sfst.gemspec",
|
53
54
|
"test/.gitignore",
|
54
55
|
"test/test_sfst.fst",
|
55
56
|
"test/test_sfst.rb"
|
@@ -57,7 +58,7 @@ Gem::Specification.new do |s|
|
|
57
58
|
s.homepage = "http://github.com/mlj/ruby-sfst"
|
58
59
|
s.require_paths = ["lib"]
|
59
60
|
s.rubyforge_project = "sfst"
|
60
|
-
s.rubygems_version = "1.8.
|
61
|
+
s.rubygems_version = "1.8.23"
|
61
62
|
s.summary = "Stuttgart Finite State Transducer Tools interface"
|
62
63
|
|
63
64
|
if s.respond_to? :specification_version then
|
metadata
CHANGED
@@ -1,32 +1,24 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-sfst
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.3.1
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 3
|
9
|
-
- 0
|
10
|
-
version: 0.3.0
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
13
|
-
-
|
7
|
+
authors:
|
8
|
+
- Marius L. Jøhndal
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
date: 2011-11-04 00:00:00 Z
|
12
|
+
date: 2013-04-09 00:00:00.000000000 Z
|
19
13
|
dependencies: []
|
20
|
-
|
21
14
|
description: A wrapper for the Stuttgart Finite State Transducer Tools (SFST).
|
22
15
|
email: mariuslj (at) ifi [dot] uio (dot) no
|
23
16
|
executables: []
|
24
|
-
|
25
|
-
extensions:
|
17
|
+
extensions:
|
26
18
|
- ext/sfst_machine/extconf.rb
|
27
|
-
extra_rdoc_files:
|
19
|
+
extra_rdoc_files:
|
28
20
|
- README.rdoc
|
29
|
-
files:
|
21
|
+
files:
|
30
22
|
- CHANGELOG
|
31
23
|
- Manifest
|
32
24
|
- README.rdoc
|
@@ -66,36 +58,26 @@ files:
|
|
66
58
|
- test/test_sfst.rb
|
67
59
|
homepage: http://github.com/mlj/ruby-sfst
|
68
60
|
licenses: []
|
69
|
-
|
70
61
|
post_install_message:
|
71
62
|
rdoc_options: []
|
72
|
-
|
73
|
-
require_paths:
|
63
|
+
require_paths:
|
74
64
|
- lib
|
75
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
65
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
76
66
|
none: false
|
77
|
-
requirements:
|
78
|
-
- -
|
79
|
-
- !ruby/object:Gem::Version
|
80
|
-
|
81
|
-
|
82
|
-
- 0
|
83
|
-
version: "0"
|
84
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
67
|
+
requirements:
|
68
|
+
- - ! '>='
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: '0'
|
71
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
85
72
|
none: false
|
86
|
-
requirements:
|
87
|
-
- -
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
|
90
|
-
segments:
|
91
|
-
- 0
|
92
|
-
version: "0"
|
73
|
+
requirements:
|
74
|
+
- - ! '>='
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
93
77
|
requirements: []
|
94
|
-
|
95
78
|
rubyforge_project: sfst
|
96
|
-
rubygems_version: 1.8.
|
79
|
+
rubygems_version: 1.8.23
|
97
80
|
signing_key:
|
98
81
|
specification_version: 3
|
99
82
|
summary: Stuttgart Finite State Transducer Tools interface
|
100
83
|
test_files: []
|
101
|
-
|