treat 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. data/INSTALL +1 -0
  2. data/README +3 -0
  3. data/TODO +14 -26
  4. data/bin/INFO +1 -1
  5. data/lib/treat/buildable.rb +10 -11
  6. data/lib/treat/categories.rb +8 -6
  7. data/lib/treat/category.rb +7 -2
  8. data/lib/treat/delegatable.rb +64 -56
  9. data/lib/treat/detectors/encoding/r_chardet19.rb +1 -1
  10. data/lib/treat/detectors/language/language_detector.rb +2 -1
  11. data/lib/treat/detectors/language/what_language.rb +2 -2
  12. data/lib/treat/detectors.rb +3 -0
  13. data/lib/treat/entities/entity.rb +1 -1
  14. data/lib/treat/entities.rb +9 -10
  15. data/lib/treat/exception.rb +3 -1
  16. data/lib/treat/extractors/named_entity/abner.rb +1 -1
  17. data/lib/treat/extractors/named_entity/stanford.rb +2 -2
  18. data/lib/treat/extractors/time/chronic.rb +2 -2
  19. data/lib/treat/extractors/time/nickel.rb +2 -2
  20. data/lib/treat/extractors/topic_words/lda.rb +2 -2
  21. data/lib/treat/extractors.rb +12 -9
  22. data/lib/treat/feature.rb +6 -1
  23. data/lib/treat/formatters/cleaners/html.rb +1 -1
  24. data/lib/treat/formatters.rb +8 -8
  25. data/lib/treat/group.rb +11 -10
  26. data/lib/treat/inflectors/cardinal_words/linguistics.rb +3 -3
  27. data/lib/treat/inflectors/{conjugators → conjugations}/linguistics.rb +6 -6
  28. data/lib/treat/inflectors/{declensors → declensions}/en.rb +2 -2
  29. data/lib/treat/inflectors/{declensors → declensions}/linguistics.rb +5 -5
  30. data/lib/treat/inflectors/ordinal_words/linguistics.rb +4 -4
  31. data/lib/treat/inflectors/{stemmers → stem}/porter.rb +1 -1
  32. data/lib/treat/inflectors/{stemmers → stem}/porter_c.rb +3 -3
  33. data/lib/treat/inflectors/{stemmers → stem}/uea.rb +3 -3
  34. data/lib/treat/inflectors.rb +8 -21
  35. data/lib/treat/kernel.rb +120 -0
  36. data/lib/treat/languages/arabic.rb +14 -0
  37. data/lib/treat/languages/categories.rb +5 -0
  38. data/lib/treat/languages/chinese.rb +12 -0
  39. data/lib/treat/languages/english/categories.rb +23 -0
  40. data/lib/treat/{resources → languages/english}/tags.rb +127 -184
  41. data/lib/treat/languages/english.rb +33 -0
  42. data/lib/treat/languages/french.rb +17 -0
  43. data/lib/treat/languages/german.rb +17 -0
  44. data/lib/treat/languages/italian.rb +14 -0
  45. data/lib/treat/{resources/languages.txt → languages/list.txt} +0 -0
  46. data/lib/treat/languages/xinhua.rb +12 -0
  47. data/lib/treat/languages.rb +91 -0
  48. data/lib/treat/lexicalizers/category/from_tag.rb +20 -8
  49. data/lib/treat/lexicalizers/synsets/rita_wn.rb +1 -1
  50. data/lib/treat/lexicalizers/tag/brill.rb +2 -1
  51. data/lib/treat/lexicalizers/tag/lingua.rb +2 -1
  52. data/lib/treat/lexicalizers/tag/stanford.rb +16 -15
  53. data/lib/treat/lexicalizers.rb +1 -1
  54. data/lib/treat/object.rb +6 -0
  55. data/lib/treat/processors/parsers/enju.rb +3 -2
  56. data/lib/treat/processors/parsers/stanford.rb +15 -12
  57. data/lib/treat/processors/segmenters/punkt.rb +1 -1
  58. data/lib/treat/processors/segmenters/stanford.rb +7 -5
  59. data/lib/treat/processors/segmenters/tactful.rb +1 -1
  60. data/lib/treat/processors/tokenizers/multilingual.rb +2 -2
  61. data/lib/treat/processors/tokenizers/stanford.rb +7 -5
  62. data/lib/treat/visitable.rb +2 -1
  63. data/lib/treat.rb +105 -54
  64. data/test/tc_entity.rb +5 -0
  65. data/test/tc_resources.rb +5 -5
  66. data/test/tc_treat.rb +1 -2
  67. data/test/tests.rb +2 -1
  68. metadata +63 -64
  69. data/lib/treat/formatters/serializers/yaml/helper.rb +0 -96
  70. data/lib/treat/inflectors/lemmatizers/e_lemma/Makefile +0 -213
  71. data/lib/treat/inflectors/lemmatizers/e_lemma/elemma.c +0 -68
  72. data/lib/treat/inflectors/lemmatizers/e_lemma/extconf.rb +0 -6
  73. data/lib/treat/inflectors/lemmatizers/e_lemma.rb +0 -12
  74. data/lib/treat/resources/categories.rb +0 -18
  75. data/lib/treat/resources/delegates.rb +0 -96
  76. data/lib/treat/resources/dependencies.rb +0 -0
  77. data/lib/treat/resources/edges.rb +0 -8
  78. data/lib/treat/resources/formats.rb +0 -23
  79. data/lib/treat/resources/languages.rb +0 -86
  80. data/lib/treat/resources.rb +0 -10
  81. data/lib/treat/utilities.rb +0 -127
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: treat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-24 00:00:00.000000000 Z
12
+ date: 2012-01-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rjb
16
- requirement: &70198460348640 !ruby/object:Gem::Requirement
16
+ requirement: &70262599384560 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70198460348640
24
+ version_requirements: *70262599384560
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: nokogiri
27
- requirement: &70198460358020 !ruby/object:Gem::Requirement
27
+ requirement: &70262599383140 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70198460358020
35
+ version_requirements: *70262599383140
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: chronic
38
- requirement: &70198460355160 !ruby/object:Gem::Requirement
38
+ requirement: &70262599397320 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70198460355160
46
+ version_requirements: *70262599397320
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: hpricot
49
- requirement: &70198460353240 !ruby/object:Gem::Requirement
49
+ requirement: &70262599393080 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *70198460353240
57
+ version_requirements: *70262599393080
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: psych
60
- requirement: &70198460351340 !ruby/object:Gem::Requirement
60
+ requirement: &70262599391760 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *70198460351340
68
+ version_requirements: *70262599391760
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rchardet19
71
- requirement: &70198460364300 !ruby/object:Gem::Requirement
71
+ requirement: &70262599390460 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '0'
77
77
  type: :runtime
78
78
  prerelease: false
79
- version_requirements: *70198460364300
79
+ version_requirements: *70262599390460
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: whatlanguage
82
- requirement: &70198460360840 !ruby/object:Gem::Requirement
82
+ requirement: &70262599405080 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: '0'
88
88
  type: :runtime
89
89
  prerelease: false
90
- version_requirements: *70198460360840
90
+ version_requirements: *70262599405080
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: wordnet
93
- requirement: &70198460374520 !ruby/object:Gem::Requirement
93
+ requirement: &70262599402680 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ! '>='
@@ -98,10 +98,10 @@ dependencies:
98
98
  version: '0'
99
99
  type: :runtime
100
100
  prerelease: false
101
- version_requirements: *70198460374520
101
+ version_requirements: *70262599402680
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: rbtagger
104
- requirement: &70198460372420 !ruby/object:Gem::Requirement
104
+ requirement: &70262599401240 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ! '>='
@@ -109,10 +109,10 @@ dependencies:
109
109
  version: '0'
110
110
  type: :runtime
111
111
  prerelease: false
112
- version_requirements: *70198460372420
112
+ version_requirements: *70262599401240
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: engtagger
115
- requirement: &70198460370340 !ruby/object:Gem::Requirement
115
+ requirement: &70262599398900 !ruby/object:Gem::Requirement
116
116
  none: false
117
117
  requirements:
118
118
  - - ! '>='
@@ -120,10 +120,10 @@ dependencies:
120
120
  version: '0'
121
121
  type: :runtime
122
122
  prerelease: false
123
- version_requirements: *70198460370340
123
+ version_requirements: *70262599398900
124
124
  - !ruby/object:Gem::Dependency
125
125
  name: punkt-segmenter
126
- requirement: &70198460383060 !ruby/object:Gem::Requirement
126
+ requirement: &70262599413620 !ruby/object:Gem::Requirement
127
127
  none: false
128
128
  requirements:
129
129
  - - ! '>='
@@ -131,10 +131,10 @@ dependencies:
131
131
  version: '0'
132
132
  type: :runtime
133
133
  prerelease: false
134
- version_requirements: *70198460383060
134
+ version_requirements: *70262599413620
135
135
  - !ruby/object:Gem::Dependency
136
136
  name: tokenizer
137
- requirement: &70198460380700 !ruby/object:Gem::Requirement
137
+ requirement: &70262599412320 !ruby/object:Gem::Requirement
138
138
  none: false
139
139
  requirements:
140
140
  - - ! '>='
@@ -142,10 +142,10 @@ dependencies:
142
142
  version: '0'
143
143
  type: :runtime
144
144
  prerelease: false
145
- version_requirements: *70198460380700
145
+ version_requirements: *70262599412320
146
146
  - !ruby/object:Gem::Dependency
147
147
  name: tactful_tokenizer
148
- requirement: &70198460378320 !ruby/object:Gem::Requirement
148
+ requirement: &70262599410780 !ruby/object:Gem::Requirement
149
149
  none: false
150
150
  requirements:
151
151
  - - ! '>='
@@ -153,10 +153,10 @@ dependencies:
153
153
  version: '0'
154
154
  type: :runtime
155
155
  prerelease: false
156
- version_requirements: *70198460378320
156
+ version_requirements: *70262599410780
157
157
  - !ruby/object:Gem::Dependency
158
158
  name: english
159
- requirement: &70198460375900 !ruby/object:Gem::Requirement
159
+ requirement: &70262599409380 !ruby/object:Gem::Requirement
160
160
  none: false
161
161
  requirements:
162
162
  - - ! '>='
@@ -164,10 +164,10 @@ dependencies:
164
164
  version: '0'
165
165
  type: :runtime
166
166
  prerelease: false
167
- version_requirements: *70198460375900
167
+ version_requirements: *70262599409380
168
168
  - !ruby/object:Gem::Dependency
169
169
  name: linguistics
170
- requirement: &70198460391000 !ruby/object:Gem::Requirement
170
+ requirement: &70262599408100 !ruby/object:Gem::Requirement
171
171
  none: false
172
172
  requirements:
173
173
  - - ! '>='
@@ -175,10 +175,10 @@ dependencies:
175
175
  version: '0'
176
176
  type: :runtime
177
177
  prerelease: false
178
- version_requirements: *70198460391000
178
+ version_requirements: *70262599408100
179
179
  - !ruby/object:Gem::Dependency
180
180
  name: ruby-stemmer
181
- requirement: &70198460389700 !ruby/object:Gem::Requirement
181
+ requirement: &70262599406740 !ruby/object:Gem::Requirement
182
182
  none: false
183
183
  requirements:
184
184
  - - ! '>='
@@ -186,10 +186,10 @@ dependencies:
186
186
  version: '0'
187
187
  type: :runtime
188
188
  prerelease: false
189
- version_requirements: *70198460389700
189
+ version_requirements: *70262599406740
190
190
  - !ruby/object:Gem::Dependency
191
191
  name: uea-stemmer
192
- requirement: &70198460388460 !ruby/object:Gem::Requirement
192
+ requirement: &70262599421480 !ruby/object:Gem::Requirement
193
193
  none: false
194
194
  requirements:
195
195
  - - ! '>='
@@ -197,10 +197,10 @@ dependencies:
197
197
  version: '0'
198
198
  type: :runtime
199
199
  prerelease: false
200
- version_requirements: *70198460388460
200
+ version_requirements: *70262599421480
201
201
  - !ruby/object:Gem::Dependency
202
202
  name: lda-ruby
203
- requirement: &70198460387460 !ruby/object:Gem::Requirement
203
+ requirement: &70262599419020 !ruby/object:Gem::Requirement
204
204
  none: false
205
205
  requirements:
206
206
  - - ! '>='
@@ -208,10 +208,10 @@ dependencies:
208
208
  version: '0'
209
209
  type: :runtime
210
210
  prerelease: false
211
- version_requirements: *70198460387460
211
+ version_requirements: *70262599419020
212
212
  - !ruby/object:Gem::Dependency
213
213
  name: nickel
214
- requirement: &70198460386440 !ruby/object:Gem::Requirement
214
+ requirement: &70262599417520 !ruby/object:Gem::Requirement
215
215
  none: false
216
216
  requirements:
217
217
  - - ! '>='
@@ -219,10 +219,10 @@ dependencies:
219
219
  version: '0'
220
220
  type: :runtime
221
221
  prerelease: false
222
- version_requirements: *70198460386440
222
+ version_requirements: *70262599417520
223
223
  - !ruby/object:Gem::Dependency
224
224
  name: unprof
225
- requirement: &70198460385440 !ruby/object:Gem::Requirement
225
+ requirement: &70262599416020 !ruby/object:Gem::Requirement
226
226
  none: false
227
227
  requirements:
228
228
  - - ! '>='
@@ -230,7 +230,7 @@ dependencies:
230
230
  version: '0'
231
231
  type: :development
232
232
  prerelease: false
233
- version_requirements: *70198460385440
233
+ version_requirements: *70262599416020
234
234
  description: ! ' Treat is a toolkit for text retrieval, information extraction and
235
235
  natural language processing. '
236
236
  email:
@@ -287,7 +287,6 @@ files:
287
287
  - lib/treat/formatters/readers/pdf.rb
288
288
  - lib/treat/formatters/readers/txt.rb
289
289
  - lib/treat/formatters/serializers/xml.rb
290
- - lib/treat/formatters/serializers/yaml/helper.rb
291
290
  - lib/treat/formatters/serializers/yaml.rb
292
291
  - lib/treat/formatters/unserializers/autoselect.rb
293
292
  - lib/treat/formatters/unserializers/xml.rb
@@ -302,18 +301,27 @@ files:
302
301
  - lib/treat/formatters.rb
303
302
  - lib/treat/group.rb
304
303
  - lib/treat/inflectors/cardinal_words/linguistics.rb
305
- - lib/treat/inflectors/conjugators/linguistics.rb
306
- - lib/treat/inflectors/declensors/en.rb
307
- - lib/treat/inflectors/declensors/linguistics.rb
308
- - lib/treat/inflectors/lemmatizers/e_lemma/elemma.c
309
- - lib/treat/inflectors/lemmatizers/e_lemma/extconf.rb
310
- - lib/treat/inflectors/lemmatizers/e_lemma/Makefile
311
- - lib/treat/inflectors/lemmatizers/e_lemma.rb
304
+ - lib/treat/inflectors/conjugations/linguistics.rb
305
+ - lib/treat/inflectors/declensions/en.rb
306
+ - lib/treat/inflectors/declensions/linguistics.rb
312
307
  - lib/treat/inflectors/ordinal_words/linguistics.rb
313
- - lib/treat/inflectors/stemmers/porter.rb
314
- - lib/treat/inflectors/stemmers/porter_c.rb
315
- - lib/treat/inflectors/stemmers/uea.rb
308
+ - lib/treat/inflectors/stem/porter.rb
309
+ - lib/treat/inflectors/stem/porter_c.rb
310
+ - lib/treat/inflectors/stem/uea.rb
316
311
  - lib/treat/inflectors.rb
312
+ - lib/treat/kernel.rb
313
+ - lib/treat/languages/arabic.rb
314
+ - lib/treat/languages/categories.rb
315
+ - lib/treat/languages/chinese.rb
316
+ - lib/treat/languages/english/categories.rb
317
+ - lib/treat/languages/english/tags.rb
318
+ - lib/treat/languages/english.rb
319
+ - lib/treat/languages/french.rb
320
+ - lib/treat/languages/german.rb
321
+ - lib/treat/languages/italian.rb
322
+ - lib/treat/languages/list.txt
323
+ - lib/treat/languages/xinhua.rb
324
+ - lib/treat/languages.rb
317
325
  - lib/treat/lexicalizers/category/from_tag.rb
318
326
  - lib/treat/lexicalizers/linkages/naive.rb
319
327
  - lib/treat/lexicalizers/synsets/rita_wn.rb
@@ -322,6 +330,7 @@ files:
322
330
  - lib/treat/lexicalizers/tag/lingua.rb
323
331
  - lib/treat/lexicalizers/tag/stanford.rb
324
332
  - lib/treat/lexicalizers.rb
333
+ - lib/treat/object.rb
325
334
  - lib/treat/processors/chunkers/txt.rb
326
335
  - lib/treat/processors/parsers/enju.rb
327
336
  - lib/treat/processors/parsers/stanford.rb
@@ -337,18 +346,8 @@ files:
337
346
  - lib/treat/processors.rb
338
347
  - lib/treat/proxies.rb
339
348
  - lib/treat/registrable.rb
340
- - lib/treat/resources/categories.rb
341
- - lib/treat/resources/delegates.rb
342
- - lib/treat/resources/dependencies.rb
343
- - lib/treat/resources/edges.rb
344
- - lib/treat/resources/formats.rb
345
- - lib/treat/resources/languages.rb
346
- - lib/treat/resources/languages.txt
347
- - lib/treat/resources/tags.rb
348
- - lib/treat/resources.rb
349
349
  - lib/treat/sugar.rb
350
350
  - lib/treat/tree.rb
351
- - lib/treat/utilities.rb
352
351
  - lib/treat/visitable.rb
353
352
  - lib/treat.rb
354
353
  - test/profile.rb
@@ -385,7 +384,7 @@ files:
385
384
  - TODO
386
385
  - LICENSE
387
386
  - INSTALL
388
- homepage: http://www.github.com/louismullie/nat
387
+ homepage: https://github.com/louismullie/treat
389
388
  licenses: []
390
389
  post_install_message:
391
390
  rdoc_options: []
@@ -1,96 +0,0 @@
1
- require 'yaml'
2
- require 'set'
3
-
4
- class Class
5
- def persist
6
- @persist = [] if !@persist
7
- @persist
8
- end
9
-
10
- def persist= p
11
- @persist = p if p.kind_of?(Array)
12
- end
13
-
14
- def persist_with_parent
15
- p = []
16
- klass = self;
17
- while klass
18
- p.concat(klass.persist)
19
- klass = klass.superclass
20
- end
21
- p.uniq
22
- end
23
- end
24
-
25
- class Object
26
- def self.persistent *var
27
- for i in (0..var.length-1)
28
- var[i] = var[i].to_s
29
- end
30
- self.persist.concat(var)
31
- self.persist.uniq!
32
- end
33
-
34
- alias_method :old_to_yaml, :to_yaml
35
-
36
- def to_yaml ( opts = {} )
37
- p = self.class.persist_with_parent
38
-
39
- if p && p.size > 0
40
- yaml_emit opts do |map|
41
- p.each do |m|
42
- map.add( m, instance_variable_get( '@' + m ) )
43
- end
44
- end
45
- else
46
- old_to_yaml opts
47
- end
48
- end
49
- private
50
- def yaml_emit opts
51
- YAML::quick_emit( object_id, opts ) do |out|
52
- out.map( taguri, to_yaml_style ) do |map|
53
- yield map
54
- end
55
- end
56
- end
57
- end
58
-
59
- module RHNH
60
- module EnumerablePostDeserializeHelper
61
- def post_deserialize
62
- self.each do |e|
63
- YAML.call_post_deserialize(e) if e
64
- end
65
- end
66
- end
67
- end
68
-
69
- class Array
70
- include RHNH::EnumerablePostDeserializeHelper
71
- end
72
-
73
- class Hash
74
- include RHNH::EnumerablePostDeserializeHelper
75
- end
76
-
77
-
78
- module YAML
79
- def YAML.call_post_deserialize obj, object_map = ::Set.new
80
- if !object_map.include?(obj.object_id)
81
- object_map.add(obj.object_id)
82
-
83
- obj.instance_variables.each do |v|
84
- call_post_deserialize obj.instance_variable_get(v), object_map
85
- end
86
-
87
- obj.post_deserialize if obj.respond_to?('post_deserialize')
88
- end
89
- end
90
-
91
- def YAML.load( io )
92
- yp = parser.load( io )
93
- call_post_deserialize yp
94
- yp
95
- end
96
- end
@@ -1,213 +0,0 @@
1
-
2
- SHELL = /bin/sh
3
-
4
- # V=0 quiet, V=1 verbose. other values don't work.
5
- V = 0
6
- Q1 = $(V:1=)
7
- Q = $(Q1:0=@)
8
- n=$(NULLCMD)
9
- ECHO1 = $(V:1=@$n)
10
- ECHO = $(ECHO1:0=@echo)
11
-
12
- #### Start of system configuration section. ####
13
-
14
- srcdir = .
15
- topdir = /usr/local/include/ruby-1.9.1
16
- hdrdir = /usr/local/include/ruby-1.9.1
17
- arch_hdrdir = /usr/local/include/ruby-1.9.1/$(arch)
18
- VPATH = $(srcdir):$(arch_hdrdir)/ruby:$(hdrdir)/ruby
19
- prefix = $(DESTDIR)/usr/local
20
- exec_prefix = $(prefix)
21
- rubylibprefix = $(libdir)/$(RUBY_BASE_NAME)
22
- bindir = $(exec_prefix)/bin
23
- sbindir = $(exec_prefix)/sbin
24
- libexecdir = $(exec_prefix)/libexec
25
- datarootdir = $(prefix)/share
26
- datadir = $(datarootdir)
27
- sysconfdir = $(prefix)/etc
28
- sharedstatedir = $(prefix)/com
29
- localstatedir = $(prefix)/var
30
- includedir = $(prefix)/include
31
- oldincludedir = $(DESTDIR)/usr/include
32
- docdir = $(datarootdir)/doc/$(PACKAGE)
33
- infodir = $(datarootdir)/info
34
- htmldir = $(docdir)
35
- dvidir = $(docdir)
36
- pdfdir = $(docdir)
37
- psdir = $(docdir)
38
- libdir = $(exec_prefix)/lib
39
- localedir = $(datarootdir)/locale
40
- mandir = $(datarootdir)/man
41
- ridir = $(datarootdir)/$(RI_BASE_NAME)
42
- sitedir = $(rubylibprefix)/site_ruby
43
- vendordir = $(rubylibprefix)/vendor_ruby
44
- rubyhdrdir = $(includedir)/$(RUBY_BASE_NAME)-$(ruby_version)
45
- sitehdrdir = $(rubyhdrdir)/site_ruby
46
- vendorhdrdir = $(rubyhdrdir)/vendor_ruby
47
- rubylibdir = $(rubylibprefix)/$(ruby_version)
48
- archdir = $(rubylibdir)/$(arch)
49
- sitelibdir = $(sitedir)/$(ruby_version)
50
- sitearchdir = $(sitelibdir)/$(sitearch)
51
- vendorlibdir = $(vendordir)/$(ruby_version)
52
- vendorarchdir = $(vendorlibdir)/$(sitearch)
53
-
54
- NULLCMD = :
55
-
56
- CC = gcc-4.2
57
- CXX = g++-4.2
58
- LIBRUBY = $(LIBRUBY_SO)
59
- LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
60
- LIBRUBYARG_SHARED = -l$(RUBY_SO_NAME)
61
- LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static
62
- OUTFLAG = -o
63
- COUTFLAG = -o
64
-
65
- RUBY_EXTCONF_H =
66
- cflags = $(optflags) $(debugflags) $(warnflags)
67
- optflags = -O3
68
- debugflags = -ggdb
69
- warnflags = -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration
70
- CFLAGS = -fno-common -Wall -I/usr/local/WordNet-2.1/include/
71
- INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir)
72
- DEFS =
73
- CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE $(DEFS) $(cppflags)
74
- CXXFLAGS = $(CFLAGS) $(cxxflags)
75
- ldflags = -L. -L/usr/local/lib
76
- dldflags = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -Wl,-flat_namespace
77
- ARCH_FLAG =
78
- DLDFLAGS = $(ldflags) $(dldflags)
79
- LDSHARED = $(CC) -dynamic -bundle
80
- LDSHAREDXX = $(CXX) -dynamic -bundle
81
- AR = ar
82
- EXEEXT =
83
-
84
- RUBY_BASE_NAME = ruby
85
- RUBY_INSTALL_NAME = ruby19
86
- RUBY_SO_NAME = ruby.1.9.1
87
- arch = x86_64-darwin11.0.0
88
- sitearch = $(arch)
89
- ruby_version = 1.9.1
90
- ruby = /usr/local/bin/ruby19
91
- RUBY = $(ruby)
92
- RM = rm -f
93
- RM_RF = $(RUBY) -run -e rm -- -rf
94
- RMDIRS = rmdir -p
95
- MAKEDIRS = mkdir -p
96
- INSTALL = /usr/bin/install -c
97
- INSTALL_PROG = $(INSTALL) -m 0755
98
- INSTALL_DATA = $(INSTALL) -m 644
99
- COPY = cp
100
-
101
- #### End of system configuration section. ####
102
-
103
- preload =
104
-
105
- libpath = . $(libdir)
106
- LIBPATH = -L. -L$(libdir)
107
- DEFFILE =
108
-
109
- CLEANFILES = mkmf.log
110
- DISTCLEANFILES =
111
- DISTCLEANDIRS =
112
-
113
- extout =
114
- extout_prefix =
115
- target_prefix =
116
- LOCAL_LIBS = -L/usr/local/WordNet-2.1/lib -lwn
117
- LIBS = $(LIBRUBYARG_SHARED) -lpthread -ldl -lobjc
118
- SRCS = elemma.c
119
- OBJS = elemma.o
120
- TARGET = elemma
121
- DLLIB = $(TARGET).bundle
122
- EXTSTATIC =
123
- STATIC_LIB =
124
-
125
- BINDIR = $(bindir)
126
- RUBYCOMMONDIR = $(sitedir)$(target_prefix)
127
- RUBYLIBDIR = $(sitelibdir)$(target_prefix)
128
- RUBYARCHDIR = $(sitearchdir)$(target_prefix)
129
- HDRDIR = $(rubyhdrdir)/ruby$(target_prefix)
130
- ARCHHDRDIR = $(rubyhdrdir)/$(arch)/ruby$(target_prefix)
131
-
132
- TARGET_SO = $(DLLIB)
133
- CLEANLIBS = $(TARGET).bundle
134
- CLEANOBJS = *.o *.bak
135
-
136
- all: $(DLLIB)
137
- static: $(STATIC_LIB)
138
- .PHONY: all install static install-so install-rb
139
- .PHONY: clean clean-so clean-rb
140
-
141
- clean-rb-default::
142
- clean-rb::
143
- clean-so::
144
- clean: clean-so clean-rb-default clean-rb
145
- @-$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES)
146
-
147
- distclean-rb-default::
148
- distclean-rb::
149
- distclean-so::
150
- distclean: clean distclean-so distclean-rb-default distclean-rb
151
- @-$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
152
- @-$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
153
- @-$(RMDIRS) $(DISTCLEANDIRS) 2> /dev/null || true
154
-
155
- realclean: distclean
156
- install: install-so install-rb
157
-
158
- install-so: $(RUBYARCHDIR)
159
- install-so: $(RUBYARCHDIR)/$(DLLIB)
160
- $(RUBYARCHDIR)/$(DLLIB): $(DLLIB)
161
- @-$(MAKEDIRS) $(@D)
162
- $(INSTALL_PROG) $(DLLIB) $(@D)
163
- install-rb: pre-install-rb install-rb-default
164
- install-rb-default: pre-install-rb-default
165
- pre-install-rb: Makefile
166
- pre-install-rb-default: Makefile
167
- pre-install-rb-default:
168
- $(ECHO) installing default elemma libraries
169
- $(RUBYARCHDIR):
170
- $(Q) $(MAKEDIRS) $@
171
-
172
- site-install: site-install-so site-install-rb
173
- site-install-so: install-so
174
- site-install-rb: install-rb
175
-
176
- .SUFFIXES: .c .m .cc .mm .cxx .cpp .C .o
177
-
178
- .cc.o:
179
- $(ECHO) compiling $(<)
180
- $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
181
-
182
- .mm.o:
183
- $(ECHO) compiling $(<)
184
- $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
185
-
186
- .cxx.o:
187
- $(ECHO) compiling $(<)
188
- $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
189
-
190
- .cpp.o:
191
- $(ECHO) compiling $(<)
192
- $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
193
-
194
- .C.o:
195
- $(ECHO) compiling $(<)
196
- $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
197
-
198
- .c.o:
199
- $(ECHO) compiling $(<)
200
- $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $<
201
-
202
- .m.o:
203
- $(ECHO) compiling $(<)
204
- $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $<
205
-
206
- $(DLLIB): $(OBJS) Makefile
207
- $(ECHO) linking shared-object $(DLLIB)
208
- @-$(RM) $(@)
209
- $(Q) $(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
210
-
211
-
212
-
213
- $(OBJS): $(hdrdir)/ruby.h $(hdrdir)/ruby/defines.h $(arch_hdrdir)/ruby/config.h