grammar_police 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (345) hide show
  1. data/.DS_Store +0 -0
  2. data/.gitignore +4 -0
  3. data/Gemfile +4 -0
  4. data/Rakefile +2 -0
  5. data/c/.DS_Store +0 -0
  6. data/c/link-grammar.c +65 -0
  7. data/c/link-grammar.h +60 -0
  8. data/c/link-grammar.o +0 -0
  9. data/c/link-grammar.so +0 -0
  10. data/c/link-grammar/.DS_Store +0 -0
  11. data/c/link-grammar/.deps/analyze-linkage.Plo +198 -0
  12. data/c/link-grammar/.deps/and.Plo +202 -0
  13. data/c/link-grammar/.deps/api.Plo +244 -0
  14. data/c/link-grammar/.deps/build-disjuncts.Plo +212 -0
  15. data/c/link-grammar/.deps/command-line.Plo +201 -0
  16. data/c/link-grammar/.deps/constituents.Plo +201 -0
  17. data/c/link-grammar/.deps/count.Plo +202 -0
  18. data/c/link-grammar/.deps/disjunct-utils.Plo +126 -0
  19. data/c/link-grammar/.deps/disjuncts.Plo +123 -0
  20. data/c/link-grammar/.deps/error.Plo +121 -0
  21. data/c/link-grammar/.deps/expand.Plo +133 -0
  22. data/c/link-grammar/.deps/extract-links.Plo +198 -0
  23. data/c/link-grammar/.deps/fast-match.Plo +200 -0
  24. data/c/link-grammar/.deps/idiom.Plo +200 -0
  25. data/c/link-grammar/.deps/jni-client.Plo +217 -0
  26. data/c/link-grammar/.deps/link-parser.Po +1 -0
  27. data/c/link-grammar/.deps/massage.Plo +202 -0
  28. data/c/link-grammar/.deps/post-process.Plo +202 -0
  29. data/c/link-grammar/.deps/pp_knowledge.Plo +202 -0
  30. data/c/link-grammar/.deps/pp_lexer.Plo +201 -0
  31. data/c/link-grammar/.deps/pp_linkset.Plo +200 -0
  32. data/c/link-grammar/.deps/prefix.Plo +102 -0
  33. data/c/link-grammar/.deps/preparation.Plo +202 -0
  34. data/c/link-grammar/.deps/print-util.Plo +200 -0
  35. data/c/link-grammar/.deps/print.Plo +201 -0
  36. data/c/link-grammar/.deps/prune.Plo +202 -0
  37. data/c/link-grammar/.deps/read-dict.Plo +223 -0
  38. data/c/link-grammar/.deps/read-regex.Plo +123 -0
  39. data/c/link-grammar/.deps/regex-morph.Plo +131 -0
  40. data/c/link-grammar/.deps/resources.Plo +203 -0
  41. data/c/link-grammar/.deps/spellcheck-aspell.Plo +1 -0
  42. data/c/link-grammar/.deps/spellcheck-hun.Plo +115 -0
  43. data/c/link-grammar/.deps/string-set.Plo +198 -0
  44. data/c/link-grammar/.deps/tokenize.Plo +160 -0
  45. data/c/link-grammar/.deps/utilities.Plo +222 -0
  46. data/c/link-grammar/.deps/word-file.Plo +201 -0
  47. data/c/link-grammar/.deps/word-utils.Plo +212 -0
  48. data/c/link-grammar/.libs/analyze-linkage.o +0 -0
  49. data/c/link-grammar/.libs/and.o +0 -0
  50. data/c/link-grammar/.libs/api.o +0 -0
  51. data/c/link-grammar/.libs/build-disjuncts.o +0 -0
  52. data/c/link-grammar/.libs/command-line.o +0 -0
  53. data/c/link-grammar/.libs/constituents.o +0 -0
  54. data/c/link-grammar/.libs/count.o +0 -0
  55. data/c/link-grammar/.libs/disjunct-utils.o +0 -0
  56. data/c/link-grammar/.libs/disjuncts.o +0 -0
  57. data/c/link-grammar/.libs/error.o +0 -0
  58. data/c/link-grammar/.libs/expand.o +0 -0
  59. data/c/link-grammar/.libs/extract-links.o +0 -0
  60. data/c/link-grammar/.libs/fast-match.o +0 -0
  61. data/c/link-grammar/.libs/idiom.o +0 -0
  62. data/c/link-grammar/.libs/jni-client.o +0 -0
  63. data/c/link-grammar/.libs/liblink-grammar-java-symbols.expsym +31 -0
  64. data/c/link-grammar/.libs/liblink-grammar-java.4.dylib +0 -0
  65. data/c/link-grammar/.libs/liblink-grammar-java.4.dylib.dSYM/Contents/Info.plist +20 -0
  66. data/c/link-grammar/.libs/liblink-grammar-java.4.dylib.dSYM/Contents/Resources/DWARF/liblink-grammar-java.4.dylib +0 -0
  67. data/c/link-grammar/.libs/liblink-grammar-java.a +0 -0
  68. data/c/link-grammar/.libs/liblink-grammar-java.dylib +0 -0
  69. data/c/link-grammar/.libs/liblink-grammar-symbols.expsym +194 -0
  70. data/c/link-grammar/.libs/liblink-grammar.4.dylib +0 -0
  71. data/c/link-grammar/.libs/liblink-grammar.4.dylib.dSYM/Contents/Info.plist +20 -0
  72. data/c/link-grammar/.libs/liblink-grammar.4.dylib.dSYM/Contents/Resources/DWARF/liblink-grammar.4.dylib +0 -0
  73. data/c/link-grammar/.libs/liblink-grammar.a +0 -0
  74. data/c/link-grammar/.libs/liblink-grammar.dylib +0 -0
  75. data/c/link-grammar/.libs/liblink-grammar.la +41 -0
  76. data/c/link-grammar/.libs/liblink-grammar.lai +41 -0
  77. data/c/link-grammar/.libs/massage.o +0 -0
  78. data/c/link-grammar/.libs/post-process.o +0 -0
  79. data/c/link-grammar/.libs/pp_knowledge.o +0 -0
  80. data/c/link-grammar/.libs/pp_lexer.o +0 -0
  81. data/c/link-grammar/.libs/pp_linkset.o +0 -0
  82. data/c/link-grammar/.libs/prefix.o +0 -0
  83. data/c/link-grammar/.libs/preparation.o +0 -0
  84. data/c/link-grammar/.libs/print-util.o +0 -0
  85. data/c/link-grammar/.libs/print.o +0 -0
  86. data/c/link-grammar/.libs/prune.o +0 -0
  87. data/c/link-grammar/.libs/read-dict.o +0 -0
  88. data/c/link-grammar/.libs/read-regex.o +0 -0
  89. data/c/link-grammar/.libs/regex-morph.o +0 -0
  90. data/c/link-grammar/.libs/resources.o +0 -0
  91. data/c/link-grammar/.libs/spellcheck-aspell.o +0 -0
  92. data/c/link-grammar/.libs/spellcheck-hun.o +0 -0
  93. data/c/link-grammar/.libs/string-set.o +0 -0
  94. data/c/link-grammar/.libs/tokenize.o +0 -0
  95. data/c/link-grammar/.libs/utilities.o +0 -0
  96. data/c/link-grammar/.libs/word-file.o +0 -0
  97. data/c/link-grammar/.libs/word-utils.o +0 -0
  98. data/c/link-grammar/Makefile +900 -0
  99. data/c/link-grammar/Makefile.am +202 -0
  100. data/c/link-grammar/Makefile.in +900 -0
  101. data/c/link-grammar/analyze-linkage.c +1317 -0
  102. data/c/link-grammar/analyze-linkage.h +24 -0
  103. data/c/link-grammar/and.c +1603 -0
  104. data/c/link-grammar/and.h +27 -0
  105. data/c/link-grammar/api-structures.h +362 -0
  106. data/c/link-grammar/api-types.h +72 -0
  107. data/c/link-grammar/api.c +1887 -0
  108. data/c/link-grammar/api.h +96 -0
  109. data/c/link-grammar/autoit/.DS_Store +0 -0
  110. data/c/link-grammar/autoit/README +10 -0
  111. data/c/link-grammar/autoit/_LGTest.au3 +22 -0
  112. data/c/link-grammar/autoit/_LinkGrammar.au3 +545 -0
  113. data/c/link-grammar/build-disjuncts.c +487 -0
  114. data/c/link-grammar/build-disjuncts.h +21 -0
  115. data/c/link-grammar/command-line.c +458 -0
  116. data/c/link-grammar/command-line.h +15 -0
  117. data/c/link-grammar/constituents.c +1836 -0
  118. data/c/link-grammar/constituents.h +26 -0
  119. data/c/link-grammar/corpus/.DS_Store +0 -0
  120. data/c/link-grammar/corpus/.deps/cluster.Plo +1 -0
  121. data/c/link-grammar/corpus/.deps/corpus.Plo +1 -0
  122. data/c/link-grammar/corpus/Makefile +527 -0
  123. data/c/link-grammar/corpus/Makefile.am +46 -0
  124. data/c/link-grammar/corpus/Makefile.in +527 -0
  125. data/c/link-grammar/corpus/README +17 -0
  126. data/c/link-grammar/corpus/cluster.c +286 -0
  127. data/c/link-grammar/corpus/cluster.h +32 -0
  128. data/c/link-grammar/corpus/corpus.c +483 -0
  129. data/c/link-grammar/corpus/corpus.h +46 -0
  130. data/c/link-grammar/count.c +828 -0
  131. data/c/link-grammar/count.h +25 -0
  132. data/c/link-grammar/disjunct-utils.c +261 -0
  133. data/c/link-grammar/disjunct-utils.h +27 -0
  134. data/c/link-grammar/disjuncts.c +138 -0
  135. data/c/link-grammar/disjuncts.h +13 -0
  136. data/c/link-grammar/error.c +92 -0
  137. data/c/link-grammar/error.h +35 -0
  138. data/c/link-grammar/expand.c +67 -0
  139. data/c/link-grammar/expand.h +13 -0
  140. data/c/link-grammar/externs.h +22 -0
  141. data/c/link-grammar/extract-links.c +625 -0
  142. data/c/link-grammar/extract-links.h +16 -0
  143. data/c/link-grammar/fast-match.c +309 -0
  144. data/c/link-grammar/fast-match.h +17 -0
  145. data/c/link-grammar/idiom.c +373 -0
  146. data/c/link-grammar/idiom.h +15 -0
  147. data/c/link-grammar/jni-client.c +779 -0
  148. data/c/link-grammar/jni-client.h +236 -0
  149. data/c/link-grammar/liblink-grammar-java.la +42 -0
  150. data/c/link-grammar/liblink-grammar.la +41 -0
  151. data/c/link-grammar/link-features.h +37 -0
  152. data/c/link-grammar/link-features.h.in +37 -0
  153. data/c/link-grammar/link-grammar-java.def +31 -0
  154. data/c/link-grammar/link-grammar.def +194 -0
  155. data/c/link-grammar/link-includes.h +465 -0
  156. data/c/link-grammar/link-parser.c +849 -0
  157. data/c/link-grammar/massage.c +329 -0
  158. data/c/link-grammar/massage.h +13 -0
  159. data/c/link-grammar/post-process.c +1113 -0
  160. data/c/link-grammar/post-process.h +45 -0
  161. data/c/link-grammar/pp_knowledge.c +376 -0
  162. data/c/link-grammar/pp_knowledge.h +14 -0
  163. data/c/link-grammar/pp_lexer.c +1920 -0
  164. data/c/link-grammar/pp_lexer.h +19 -0
  165. data/c/link-grammar/pp_linkset.c +158 -0
  166. data/c/link-grammar/pp_linkset.h +20 -0
  167. data/c/link-grammar/prefix.c +482 -0
  168. data/c/link-grammar/prefix.h +139 -0
  169. data/c/link-grammar/preparation.c +412 -0
  170. data/c/link-grammar/preparation.h +20 -0
  171. data/c/link-grammar/print-util.c +87 -0
  172. data/c/link-grammar/print-util.h +32 -0
  173. data/c/link-grammar/print.c +1085 -0
  174. data/c/link-grammar/print.h +16 -0
  175. data/c/link-grammar/prune.c +1864 -0
  176. data/c/link-grammar/prune.h +17 -0
  177. data/c/link-grammar/read-dict.c +1785 -0
  178. data/c/link-grammar/read-dict.h +29 -0
  179. data/c/link-grammar/read-regex.c +161 -0
  180. data/c/link-grammar/read-regex.h +12 -0
  181. data/c/link-grammar/regex-morph.c +126 -0
  182. data/c/link-grammar/regex-morph.h +17 -0
  183. data/c/link-grammar/resources.c +180 -0
  184. data/c/link-grammar/resources.h +23 -0
  185. data/c/link-grammar/sat-solver/.DS_Store +0 -0
  186. data/c/link-grammar/sat-solver/.deps/fast-sprintf.Plo +1 -0
  187. data/c/link-grammar/sat-solver/.deps/sat-encoder.Plo +1 -0
  188. data/c/link-grammar/sat-solver/.deps/util.Plo +1 -0
  189. data/c/link-grammar/sat-solver/.deps/variables.Plo +1 -0
  190. data/c/link-grammar/sat-solver/.deps/word-tag.Plo +1 -0
  191. data/c/link-grammar/sat-solver/Makefile +527 -0
  192. data/c/link-grammar/sat-solver/Makefile.am +29 -0
  193. data/c/link-grammar/sat-solver/Makefile.in +527 -0
  194. data/c/link-grammar/sat-solver/clock.hpp +33 -0
  195. data/c/link-grammar/sat-solver/fast-sprintf.cpp +26 -0
  196. data/c/link-grammar/sat-solver/fast-sprintf.hpp +7 -0
  197. data/c/link-grammar/sat-solver/guiding.hpp +244 -0
  198. data/c/link-grammar/sat-solver/matrix-ut.hpp +79 -0
  199. data/c/link-grammar/sat-solver/sat-encoder.cpp +2811 -0
  200. data/c/link-grammar/sat-solver/sat-encoder.h +11 -0
  201. data/c/link-grammar/sat-solver/sat-encoder.hpp +381 -0
  202. data/c/link-grammar/sat-solver/trie.hpp +118 -0
  203. data/c/link-grammar/sat-solver/util.cpp +23 -0
  204. data/c/link-grammar/sat-solver/util.hpp +14 -0
  205. data/c/link-grammar/sat-solver/variables.cpp +5 -0
  206. data/c/link-grammar/sat-solver/variables.hpp +829 -0
  207. data/c/link-grammar/sat-solver/word-tag.cpp +159 -0
  208. data/c/link-grammar/sat-solver/word-tag.hpp +162 -0
  209. data/c/link-grammar/spellcheck-aspell.c +148 -0
  210. data/c/link-grammar/spellcheck-hun.c +136 -0
  211. data/c/link-grammar/spellcheck.h +34 -0
  212. data/c/link-grammar/string-set.c +169 -0
  213. data/c/link-grammar/string-set.h +16 -0
  214. data/c/link-grammar/structures.h +498 -0
  215. data/c/link-grammar/tokenize.c +1049 -0
  216. data/c/link-grammar/tokenize.h +15 -0
  217. data/c/link-grammar/utilities.c +847 -0
  218. data/c/link-grammar/utilities.h +281 -0
  219. data/c/link-grammar/word-file.c +124 -0
  220. data/c/link-grammar/word-file.h +15 -0
  221. data/c/link-grammar/word-utils.c +526 -0
  222. data/c/link-grammar/word-utils.h +152 -0
  223. data/data/.DS_Store +0 -0
  224. data/data/Makefile +511 -0
  225. data/data/Makefile.am +4 -0
  226. data/data/Makefile.in +511 -0
  227. data/data/de/.DS_Store +0 -0
  228. data/data/de/4.0.affix +7 -0
  229. data/data/de/4.0.dict +474 -0
  230. data/data/de/Makefile +387 -0
  231. data/data/de/Makefile.am +9 -0
  232. data/data/de/Makefile.in +387 -0
  233. data/data/en/.DS_Store +0 -0
  234. data/data/en/4.0.affix +26 -0
  235. data/data/en/4.0.batch +1002 -0
  236. data/data/en/4.0.biolg.batch +411 -0
  237. data/data/en/4.0.constituent-knowledge +127 -0
  238. data/data/en/4.0.dict +8759 -0
  239. data/data/en/4.0.dict.m4 +6928 -0
  240. data/data/en/4.0.enwiki.batch +14 -0
  241. data/data/en/4.0.fixes.batch +2776 -0
  242. data/data/en/4.0.knowledge +306 -0
  243. data/data/en/4.0.regex +225 -0
  244. data/data/en/4.0.voa.batch +114 -0
  245. data/data/en/Makefile +554 -0
  246. data/data/en/Makefile.am +19 -0
  247. data/data/en/Makefile.in +554 -0
  248. data/data/en/README +173 -0
  249. data/data/en/tiny.dict +157 -0
  250. data/data/en/words/.DS_Store +0 -0
  251. data/data/en/words/Makefile +456 -0
  252. data/data/en/words/Makefile.am +78 -0
  253. data/data/en/words/Makefile.in +456 -0
  254. data/data/en/words/currency +205 -0
  255. data/data/en/words/currency.p +28 -0
  256. data/data/en/words/entities.given-bisex.sing +39 -0
  257. data/data/en/words/entities.given-female.sing +4141 -0
  258. data/data/en/words/entities.given-male.sing +1633 -0
  259. data/data/en/words/entities.locations.sing +68 -0
  260. data/data/en/words/entities.national.sing +253 -0
  261. data/data/en/words/entities.organizations.sing +7 -0
  262. data/data/en/words/entities.us-states.sing +11 -0
  263. data/data/en/words/units.1 +45 -0
  264. data/data/en/words/units.1.dot +4 -0
  265. data/data/en/words/units.3 +2 -0
  266. data/data/en/words/units.4 +5 -0
  267. data/data/en/words/units.4.dot +1 -0
  268. data/data/en/words/words-medical.adv.1 +1191 -0
  269. data/data/en/words/words-medical.prep.1 +67 -0
  270. data/data/en/words/words-medical.v.4.1 +2835 -0
  271. data/data/en/words/words-medical.v.4.2 +2848 -0
  272. data/data/en/words/words-medical.v.4.3 +3011 -0
  273. data/data/en/words/words-medical.v.4.4 +3036 -0
  274. data/data/en/words/words-medical.v.4.5 +3050 -0
  275. data/data/en/words/words.adj.1 +6794 -0
  276. data/data/en/words/words.adj.2 +638 -0
  277. data/data/en/words/words.adj.3 +667 -0
  278. data/data/en/words/words.adv.1 +1573 -0
  279. data/data/en/words/words.adv.2 +67 -0
  280. data/data/en/words/words.adv.3 +157 -0
  281. data/data/en/words/words.adv.4 +80 -0
  282. data/data/en/words/words.n.1 +11464 -0
  283. data/data/en/words/words.n.1.wiki +264 -0
  284. data/data/en/words/words.n.2.s +2017 -0
  285. data/data/en/words/words.n.2.s.biolg +1 -0
  286. data/data/en/words/words.n.2.s.wiki +298 -0
  287. data/data/en/words/words.n.2.x +65 -0
  288. data/data/en/words/words.n.2.x.wiki +10 -0
  289. data/data/en/words/words.n.3 +5717 -0
  290. data/data/en/words/words.n.t +23 -0
  291. data/data/en/words/words.v.1.1 +1038 -0
  292. data/data/en/words/words.v.1.2 +1043 -0
  293. data/data/en/words/words.v.1.3 +1052 -0
  294. data/data/en/words/words.v.1.4 +1023 -0
  295. data/data/en/words/words.v.1.p +17 -0
  296. data/data/en/words/words.v.10.1 +14 -0
  297. data/data/en/words/words.v.10.2 +15 -0
  298. data/data/en/words/words.v.10.3 +88 -0
  299. data/data/en/words/words.v.10.4 +17 -0
  300. data/data/en/words/words.v.2.1 +1253 -0
  301. data/data/en/words/words.v.2.2 +1304 -0
  302. data/data/en/words/words.v.2.3 +1280 -0
  303. data/data/en/words/words.v.2.4 +1285 -0
  304. data/data/en/words/words.v.2.5 +1287 -0
  305. data/data/en/words/words.v.4.1 +2472 -0
  306. data/data/en/words/words.v.4.2 +2487 -0
  307. data/data/en/words/words.v.4.3 +2441 -0
  308. data/data/en/words/words.v.4.4 +2478 -0
  309. data/data/en/words/words.v.4.5 +2483 -0
  310. data/data/en/words/words.v.5.1 +98 -0
  311. data/data/en/words/words.v.5.2 +98 -0
  312. data/data/en/words/words.v.5.3 +103 -0
  313. data/data/en/words/words.v.5.4 +102 -0
  314. data/data/en/words/words.v.6.1 +388 -0
  315. data/data/en/words/words.v.6.2 +401 -0
  316. data/data/en/words/words.v.6.3 +397 -0
  317. data/data/en/words/words.v.6.4 +405 -0
  318. data/data/en/words/words.v.6.5 +401 -0
  319. data/data/en/words/words.v.8.1 +117 -0
  320. data/data/en/words/words.v.8.2 +118 -0
  321. data/data/en/words/words.v.8.3 +118 -0
  322. data/data/en/words/words.v.8.4 +119 -0
  323. data/data/en/words/words.v.8.5 +119 -0
  324. data/data/en/words/words.y +104 -0
  325. data/data/lt/.DS_Store +0 -0
  326. data/data/lt/4.0.affix +6 -0
  327. data/data/lt/4.0.constituent-knowledge +24 -0
  328. data/data/lt/4.0.dict +135 -0
  329. data/data/lt/4.0.knowledge +38 -0
  330. data/data/lt/Makefile +389 -0
  331. data/data/lt/Makefile.am +11 -0
  332. data/data/lt/Makefile.in +389 -0
  333. data/grammar_police.gemspec +23 -0
  334. data/lib/.DS_Store +0 -0
  335. data/lib/grammar_police.rb +11 -0
  336. data/lib/grammar_police/.DS_Store +0 -0
  337. data/lib/grammar_police/dictionary.rb +30 -0
  338. data/lib/grammar_police/linkage.rb +26 -0
  339. data/lib/grammar_police/parse_options.rb +32 -0
  340. data/lib/grammar_police/sentence.rb +44 -0
  341. data/lib/grammar_police/version.rb +3 -0
  342. data/tests/.DS_Store +0 -0
  343. data/tests/count_linkages.rb +29 -0
  344. data/tests/sentences.txt +86 -0
  345. metadata +408 -0
@@ -0,0 +1,11 @@
1
+
2
+ DICTS= \
3
+ 4.0.affix \
4
+ 4.0.constituent-knowledge \
5
+ 4.0.dict \
6
+ 4.0.knowledge
7
+
8
+ dictdir=$(pkgdatadir)/lt
9
+ dict_DATA = $(DICTS)
10
+
11
+ EXTRA_DIST = $(DICTS)
@@ -0,0 +1,389 @@
1
+ # Makefile.in generated by automake 1.10.2 from Makefile.am.
2
+ # @configure_input@
3
+
4
+ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5
+ # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
6
+ # This Makefile.in is free software; the Free Software Foundation
7
+ # gives unlimited permission to copy and/or distribute it,
8
+ # with or without modifications, as long as this notice is preserved.
9
+
10
+ # This program is distributed in the hope that it will be useful,
11
+ # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12
+ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13
+ # PARTICULAR PURPOSE.
14
+
15
+ @SET_MAKE@
16
+
17
+ VPATH = @srcdir@
18
+ pkgdatadir = $(datadir)/@PACKAGE@
19
+ pkglibdir = $(libdir)/@PACKAGE@
20
+ pkgincludedir = $(includedir)/@PACKAGE@
21
+ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
22
+ install_sh_DATA = $(install_sh) -c -m 644
23
+ install_sh_PROGRAM = $(install_sh) -c
24
+ install_sh_SCRIPT = $(install_sh) -c
25
+ INSTALL_HEADER = $(INSTALL_DATA)
26
+ transform = $(program_transform_name)
27
+ NORMAL_INSTALL = :
28
+ PRE_INSTALL = :
29
+ POST_INSTALL = :
30
+ NORMAL_UNINSTALL = :
31
+ PRE_UNINSTALL = :
32
+ POST_UNINSTALL = :
33
+ build_triplet = @build@
34
+ host_triplet = @host@
35
+ subdir = data/lt
36
+ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
37
+ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
38
+ am__aclocal_m4_deps = $(top_srcdir)/ac-helpers/binreloc.m4 \
39
+ $(top_srcdir)/configure.in
40
+ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
41
+ $(ACLOCAL_M4)
42
+ mkinstalldirs = $(install_sh) -d
43
+ CONFIG_CLEAN_FILES =
44
+ SOURCES =
45
+ DIST_SOURCES =
46
+ am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
47
+ am__vpath_adj = case $$p in \
48
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
49
+ *) f=$$p;; \
50
+ esac;
51
+ am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
52
+ am__installdirs = "$(DESTDIR)$(dictdir)"
53
+ dictDATA_INSTALL = $(INSTALL_DATA)
54
+ DATA = $(dict_DATA)
55
+ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
56
+ ACLOCAL = @ACLOCAL@
57
+ AMTAR = @AMTAR@
58
+ AR = @AR@
59
+ AS = @AS@
60
+ ASPELL_CFLAGS = @ASPELL_CFLAGS@
61
+ ASPELL_LIBS = @ASPELL_LIBS@
62
+ AUTOCONF = @AUTOCONF@
63
+ AUTOHEADER = @AUTOHEADER@
64
+ AUTOMAKE = @AUTOMAKE@
65
+ AWK = @AWK@
66
+ BINRELOC_CFLAGS = @BINRELOC_CFLAGS@
67
+ BINRELOC_LIBS = @BINRELOC_LIBS@
68
+ CC = @CC@
69
+ CCDEPMODE = @CCDEPMODE@
70
+ CFLAGS = @CFLAGS@
71
+ CPP = @CPP@
72
+ CPPFLAGS = @CPPFLAGS@
73
+ CXX = @CXX@
74
+ CXXCPP = @CXXCPP@
75
+ CXXDEPMODE = @CXXDEPMODE@
76
+ CXXFLAGS = @CXXFLAGS@
77
+ CYGPATH_W = @CYGPATH_W@
78
+ DEFS = @DEFS@
79
+ DEPDIR = @DEPDIR@
80
+ DLLTOOL = @DLLTOOL@
81
+ DSYMUTIL = @DSYMUTIL@
82
+ DUMPBIN = @DUMPBIN@
83
+ ECHO_C = @ECHO_C@
84
+ ECHO_N = @ECHO_N@
85
+ ECHO_T = @ECHO_T@
86
+ EGREP = @EGREP@
87
+ EXEEXT = @EXEEXT@
88
+ FGREP = @FGREP@
89
+ GREP = @GREP@
90
+ HUNSPELL_CFLAGS = @HUNSPELL_CFLAGS@
91
+ HUNSPELL_LIBS = @HUNSPELL_LIBS@
92
+ INSTALL = @INSTALL@
93
+ INSTALL_DATA = @INSTALL_DATA@
94
+ INSTALL_PROGRAM = @INSTALL_PROGRAM@
95
+ INSTALL_SCRIPT = @INSTALL_SCRIPT@
96
+ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
97
+ LD = @LD@
98
+ LDFLAGS = @LDFLAGS@
99
+ LIBEDIT_CFLAGS = @LIBEDIT_CFLAGS@
100
+ LIBEDIT_LIBS = @LIBEDIT_LIBS@
101
+ LIBOBJS = @LIBOBJS@
102
+ LIBS = @LIBS@
103
+ LIBTOOL = @LIBTOOL@
104
+ LINK_CFLAGS = @LINK_CFLAGS@
105
+ LINK_MAJOR_VERSION = @LINK_MAJOR_VERSION@
106
+ LINK_MICRO_VERSION = @LINK_MICRO_VERSION@
107
+ LINK_MINOR_VERSION = @LINK_MINOR_VERSION@
108
+ LIPO = @LIPO@
109
+ LN_S = @LN_S@
110
+ LTLIBOBJS = @LTLIBOBJS@
111
+ MAINT = @MAINT@
112
+ MAKEINFO = @MAKEINFO@
113
+ MKDIR_P = @MKDIR_P@
114
+ NM = @NM@
115
+ NMEDIT = @NMEDIT@
116
+ OBJDUMP = @OBJDUMP@
117
+ OBJEXT = @OBJEXT@
118
+ OTOOL = @OTOOL@
119
+ OTOOL64 = @OTOOL64@
120
+ PACKAGE = @PACKAGE@
121
+ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
122
+ PACKAGE_NAME = @PACKAGE_NAME@
123
+ PACKAGE_STRING = @PACKAGE_STRING@
124
+ PACKAGE_TARNAME = @PACKAGE_TARNAME@
125
+ PACKAGE_VERSION = @PACKAGE_VERSION@
126
+ PATH_SEPARATOR = @PATH_SEPARATOR@
127
+ PKG_CONFIG = @PKG_CONFIG@
128
+ RANLIB = @RANLIB@
129
+ REGEX_LIBS = @REGEX_LIBS@
130
+ SED = @SED@
131
+ SET_MAKE = @SET_MAKE@
132
+ SHELL = @SHELL@
133
+ SQLITE3_CFLAGS = @SQLITE3_CFLAGS@
134
+ SQLITE3_LIBS = @SQLITE3_LIBS@
135
+ STRIP = @STRIP@
136
+ VERSION = @VERSION@
137
+ VERSION_INFO = @VERSION_INFO@
138
+ abs_builddir = @abs_builddir@
139
+ abs_srcdir = @abs_srcdir@
140
+ abs_top_builddir = @abs_top_builddir@
141
+ abs_top_srcdir = @abs_top_srcdir@
142
+ ac_ct_CC = @ac_ct_CC@
143
+ ac_ct_CXX = @ac_ct_CXX@
144
+ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
145
+ am__include = @am__include@
146
+ am__leading_dot = @am__leading_dot@
147
+ am__quote = @am__quote@
148
+ am__tar = @am__tar@
149
+ am__untar = @am__untar@
150
+ bindir = @bindir@
151
+ build = @build@
152
+ build_alias = @build_alias@
153
+ build_cpu = @build_cpu@
154
+ build_os = @build_os@
155
+ build_vendor = @build_vendor@
156
+ builddir = @builddir@
157
+ datadir = @datadir@
158
+ datarootdir = @datarootdir@
159
+ docdir = @docdir@
160
+ dvidir = @dvidir@
161
+ exec_prefix = @exec_prefix@
162
+ host = @host@
163
+ host_alias = @host_alias@
164
+ host_cpu = @host_cpu@
165
+ host_os = @host_os@
166
+ host_vendor = @host_vendor@
167
+ htmldir = @htmldir@
168
+ includedir = @includedir@
169
+ infodir = @infodir@
170
+ install_sh = @install_sh@
171
+ libdir = @libdir@
172
+ libexecdir = @libexecdir@
173
+ localedir = @localedir@
174
+ localstatedir = @localstatedir@
175
+ lt_ECHO = @lt_ECHO@
176
+ mandir = @mandir@
177
+ mkdir_p = @mkdir_p@
178
+ oldincludedir = @oldincludedir@
179
+ pdfdir = @pdfdir@
180
+ prefix = @prefix@
181
+ program_transform_name = @program_transform_name@
182
+ psdir = @psdir@
183
+ sbindir = @sbindir@
184
+ sharedstatedir = @sharedstatedir@
185
+ srcdir = @srcdir@
186
+ sysconfdir = @sysconfdir@
187
+ target_alias = @target_alias@
188
+ top_build_prefix = @top_build_prefix@
189
+ top_builddir = @top_builddir@
190
+ top_srcdir = @top_srcdir@
191
+ DICTS = \
192
+ 4.0.affix \
193
+ 4.0.constituent-knowledge \
194
+ 4.0.dict \
195
+ 4.0.knowledge
196
+
197
+ dictdir = $(pkgdatadir)/lt
198
+ dict_DATA = $(DICTS)
199
+ EXTRA_DIST = $(DICTS)
200
+ all: all-am
201
+
202
+ .SUFFIXES:
203
+ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
204
+ @for dep in $?; do \
205
+ case '$(am__configure_deps)' in \
206
+ *$$dep*) \
207
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
208
+ && { if test -f $@; then exit 0; else break; fi; }; \
209
+ exit 1;; \
210
+ esac; \
211
+ done; \
212
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign data/lt/Makefile'; \
213
+ cd $(top_srcdir) && \
214
+ $(AUTOMAKE) --foreign data/lt/Makefile
215
+ .PRECIOUS: Makefile
216
+ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
217
+ @case '$?' in \
218
+ *config.status*) \
219
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
220
+ *) \
221
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
222
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
223
+ esac;
224
+
225
+ $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
226
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
227
+
228
+ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
229
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
230
+ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
231
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
232
+
233
+ mostlyclean-libtool:
234
+ -rm -f *.lo
235
+
236
+ clean-libtool:
237
+ -rm -rf .libs _libs
238
+ install-dictDATA: $(dict_DATA)
239
+ @$(NORMAL_INSTALL)
240
+ test -z "$(dictdir)" || $(MKDIR_P) "$(DESTDIR)$(dictdir)"
241
+ @list='$(dict_DATA)'; for p in $$list; do \
242
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
243
+ f=$(am__strip_dir) \
244
+ echo " $(dictDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(dictdir)/$$f'"; \
245
+ $(dictDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(dictdir)/$$f"; \
246
+ done
247
+
248
+ uninstall-dictDATA:
249
+ @$(NORMAL_UNINSTALL)
250
+ @list='$(dict_DATA)'; for p in $$list; do \
251
+ f=$(am__strip_dir) \
252
+ echo " rm -f '$(DESTDIR)$(dictdir)/$$f'"; \
253
+ rm -f "$(DESTDIR)$(dictdir)/$$f"; \
254
+ done
255
+ tags: TAGS
256
+ TAGS:
257
+
258
+ ctags: CTAGS
259
+ CTAGS:
260
+
261
+
262
+ distdir: $(DISTFILES)
263
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
264
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
265
+ list='$(DISTFILES)'; \
266
+ dist_files=`for file in $$list; do echo $$file; done | \
267
+ sed -e "s|^$$srcdirstrip/||;t" \
268
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
269
+ case $$dist_files in \
270
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
271
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
272
+ sort -u` ;; \
273
+ esac; \
274
+ for file in $$dist_files; do \
275
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
276
+ if test -d $$d/$$file; then \
277
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
278
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
279
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
280
+ fi; \
281
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
282
+ else \
283
+ test -f $(distdir)/$$file \
284
+ || cp -p $$d/$$file $(distdir)/$$file \
285
+ || exit 1; \
286
+ fi; \
287
+ done
288
+ check-am: all-am
289
+ check: check-am
290
+ all-am: Makefile $(DATA)
291
+ installdirs:
292
+ for dir in "$(DESTDIR)$(dictdir)"; do \
293
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
294
+ done
295
+ install: install-am
296
+ install-exec: install-exec-am
297
+ install-data: install-data-am
298
+ uninstall: uninstall-am
299
+
300
+ install-am: all-am
301
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
302
+
303
+ installcheck: installcheck-am
304
+ install-strip:
305
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
306
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
307
+ `test -z '$(STRIP)' || \
308
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
309
+ mostlyclean-generic:
310
+
311
+ clean-generic:
312
+
313
+ distclean-generic:
314
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
315
+
316
+ maintainer-clean-generic:
317
+ @echo "This command is intended for maintainers to use"
318
+ @echo "it deletes files that may require special tools to rebuild."
319
+ clean: clean-am
320
+
321
+ clean-am: clean-generic clean-libtool mostlyclean-am
322
+
323
+ distclean: distclean-am
324
+ -rm -f Makefile
325
+ distclean-am: clean-am distclean-generic
326
+
327
+ dvi: dvi-am
328
+
329
+ dvi-am:
330
+
331
+ html: html-am
332
+
333
+ info: info-am
334
+
335
+ info-am:
336
+
337
+ install-data-am: install-dictDATA
338
+
339
+ install-dvi: install-dvi-am
340
+
341
+ install-exec-am:
342
+
343
+ install-html: install-html-am
344
+
345
+ install-info: install-info-am
346
+
347
+ install-man:
348
+
349
+ install-pdf: install-pdf-am
350
+
351
+ install-ps: install-ps-am
352
+
353
+ installcheck-am:
354
+
355
+ maintainer-clean: maintainer-clean-am
356
+ -rm -f Makefile
357
+ maintainer-clean-am: distclean-am maintainer-clean-generic
358
+
359
+ mostlyclean: mostlyclean-am
360
+
361
+ mostlyclean-am: mostlyclean-generic mostlyclean-libtool
362
+
363
+ pdf: pdf-am
364
+
365
+ pdf-am:
366
+
367
+ ps: ps-am
368
+
369
+ ps-am:
370
+
371
+ uninstall-am: uninstall-dictDATA
372
+
373
+ .MAKE: install-am install-strip
374
+
375
+ .PHONY: all all-am check check-am clean clean-generic clean-libtool \
376
+ distclean distclean-generic distclean-libtool distdir dvi \
377
+ dvi-am html html-am info info-am install install-am \
378
+ install-data install-data-am install-dictDATA install-dvi \
379
+ install-dvi-am install-exec install-exec-am install-html \
380
+ install-html-am install-info install-info-am install-man \
381
+ install-pdf install-pdf-am install-ps install-ps-am \
382
+ install-strip installcheck installcheck-am installdirs \
383
+ maintainer-clean maintainer-clean-generic mostlyclean \
384
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
385
+ uninstall uninstall-am uninstall-dictDATA
386
+
387
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
388
+ # Otherwise a system limit (for SysV at least) may be exceeded.
389
+ .NOEXPORT:
@@ -0,0 +1,23 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "grammar_police/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "grammar_police"
7
+ s.version = GrammarPolice::VERSION
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ["Quan Nguyen"]
10
+ s.email = ["mquannie@gmail.com"]
11
+ s.homepage = ""
12
+ s.summary = %q{grammar_police is a ruby wrapper for the link-grammar code}
13
+ s.description = %q{Unlike the other wrapper of the same library, this gem contains the c code and dictionary data, making it a standalone gem. This is good for deployment on platforms such as heroku where you can't install native libraries to your environment}
14
+
15
+ s.rubyforge_project = "grammar_police"
16
+
17
+ s.files = `git ls-files`.split("\n")
18
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
19
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
+ s.require_paths = ["lib"]
21
+
22
+ s.add_dependency(%q<ffi>)
23
+ end
data/lib/.DS_Store ADDED
Binary file
@@ -0,0 +1,11 @@
1
+ $: << File.dirname(__FILE__)
2
+ require 'ffi'
3
+ require 'grammar_police/sentence'
4
+ require 'grammar_police/dictionary'
5
+ require 'grammar_police/linkage'
6
+ require 'grammar_police/parse_options'
7
+
8
+ module GrammarPolice
9
+ #set dictionary path based on the installed gem path
10
+ GrammarPolice::Dictionary.dictionary_set_data_dir("#{Gem.loaded_specs['grammar_police'].full_gem_path}/data/")
11
+ end
Binary file
@@ -0,0 +1,30 @@
1
+ module GrammarPolice
2
+ #can't move location of dictionary, it's a dirty hack (../../data/)
3
+ #only reason it works is data is 2 levels up from this ruby file and also 2 levels up from its C code
4
+ class Dictionary
5
+ extend FFI::Library
6
+ ffi_lib "#{File.dirname(__FILE__)}/../../c/link-grammar.so"
7
+ #set locale ensure utf8 data in dictionary can be read
8
+ #attach_function(:setlocale, [LC_ALL, "])
9
+
10
+ #specify dictionary directory
11
+ attach_function(:dictionary_set_data_dir, [:string], :void)
12
+
13
+ #("en") for english, return Dictionary
14
+ attach_function(:dictionary_create_lang, [:string], :pointer)
15
+
16
+ #like above function but no language specification (default to "en"), return Dictionary
17
+ attach_function(:dictionary_create_default_lang, [], :pointer)
18
+
19
+ #free up all space used by Dictionary object and close associated post-processor, pass in Dictionary
20
+ attach_function(:dictionary_delete, [:pointer], :int)
21
+
22
+ def self.create(lang)
23
+ dictionary_create_lang(lang)
24
+ end
25
+
26
+ def self.destroy(dictionary)
27
+ dictionary_delete(dictionary)
28
+ end
29
+ end
30
+ end