NLPPlus 0.2.1.dev0__cp312-cp312-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (316) hide show
  1. NLPPlus/__init__.py +204 -0
  2. NLPPlus/_version.py +21 -0
  3. NLPPlus/analyzers/address-parser/README.md +12 -0
  4. NLPPlus/analyzers/address-parser/input/text.txt +24 -0
  5. NLPPlus/analyzers/address-parser/kb/user/Country.dict +196 -0
  6. NLPPlus/analyzers/address-parser/kb/user/address-synonym.dict +14 -0
  7. NLPPlus/analyzers/address-parser/kb/user/attr.kb +254 -0
  8. NLPPlus/analyzers/address-parser/kb/user/designator.dict +7 -0
  9. NLPPlus/analyzers/address-parser/kb/user/directions.dict +16 -0
  10. NLPPlus/analyzers/address-parser/kb/user/en-usa-states.dict +105 -0
  11. NLPPlus/analyzers/address-parser/kb/user/en-usa-streetsuff.dict +548 -0
  12. NLPPlus/analyzers/address-parser/kb/user/hier.kb +756 -0
  13. NLPPlus/analyzers/address-parser/kb/user/military-address.dict +9 -0
  14. NLPPlus/analyzers/address-parser/kb/user/phr.kb +3 -0
  15. NLPPlus/analyzers/address-parser/kb/user/word.kb +57 -0
  16. NLPPlus/analyzers/address-parser/spec/Changenumbers.nlp +17 -0
  17. NLPPlus/analyzers/address-parser/spec/Grouping.nlp +17 -0
  18. NLPPlus/analyzers/address-parser/spec/KBFuncs.nlp +444 -0
  19. NLPPlus/analyzers/address-parser/spec/Lines.nlp +21 -0
  20. NLPPlus/analyzers/address-parser/spec/PrecedingWords.nlp +40 -0
  21. NLPPlus/analyzers/address-parser/spec/RemovePunct.nlp +15 -0
  22. NLPPlus/analyzers/address-parser/spec/RemoveSpecialChars.nlp +30 -0
  23. NLPPlus/analyzers/address-parser/spec/RemoveWhiteSpace.nlp +20 -0
  24. NLPPlus/analyzers/address-parser/spec/analyzer.seq +18 -0
  25. NLPPlus/analyzers/address-parser/spec/countryname.nlp +18 -0
  26. NLPPlus/analyzers/address-parser/spec/funcs.nlp +141 -0
  27. NLPPlus/analyzers/address-parser/spec/information.nlp +91 -0
  28. NLPPlus/analyzers/address-parser/spec/information1.nlp +88 -0
  29. NLPPlus/analyzers/address-parser/spec/information2.nlp +19 -0
  30. NLPPlus/analyzers/address-parser/spec/information3.nlp +42 -0
  31. NLPPlus/analyzers/address-parser/spec/kbdisp01.nlp +13 -0
  32. NLPPlus/analyzers/address-parser/spec/kbinit.nlp +15 -0
  33. NLPPlus/analyzers/address-parser/spec/kbmake.nlp +17 -0
  34. NLPPlus/analyzers/address-parser/spec/output.nlp +11 -0
  35. NLPPlus/analyzers/address-parser/spec/pincode.nlp +35 -0
  36. NLPPlus/analyzers/address-parser/spec/removelines.nlp +17 -0
  37. NLPPlus/analyzers/address-parser/tmp/README.md +1 -0
  38. NLPPlus/analyzers/emailaddress/README.md +6 -0
  39. NLPPlus/analyzers/emailaddress/input/text.txt +30 -0
  40. NLPPlus/analyzers/emailaddress/kb/user/attr.kb +254 -0
  41. NLPPlus/analyzers/emailaddress/kb/user/country.dict +264 -0
  42. NLPPlus/analyzers/emailaddress/kb/user/domain.dict +1134 -0
  43. NLPPlus/analyzers/emailaddress/kb/user/hier.kb +756 -0
  44. NLPPlus/analyzers/emailaddress/kb/user/phr.kb +3 -0
  45. NLPPlus/analyzers/emailaddress/kb/user/word.kb +57 -0
  46. NLPPlus/analyzers/emailaddress/spec/KBFuncs.nlp +444 -0
  47. NLPPlus/analyzers/emailaddress/spec/Lines.nlp +21 -0
  48. NLPPlus/analyzers/emailaddress/spec/RemoveWhiteSpace.nlp +20 -0
  49. NLPPlus/analyzers/emailaddress/spec/analyzer.seq +16 -0
  50. NLPPlus/analyzers/emailaddress/spec/email1.nlp +146 -0
  51. NLPPlus/analyzers/emailaddress/spec/email11.nlp +52 -0
  52. NLPPlus/analyzers/emailaddress/spec/email12.nlp +17 -0
  53. NLPPlus/analyzers/emailaddress/spec/email2.nlp +17 -0
  54. NLPPlus/analyzers/emailaddress/spec/email3.nlp +20 -0
  55. NLPPlus/analyzers/emailaddress/spec/email4.nlp +20 -0
  56. NLPPlus/analyzers/emailaddress/spec/email5.nlp +19 -0
  57. NLPPlus/analyzers/emailaddress/spec/email6.nlp +31 -0
  58. NLPPlus/analyzers/emailaddress/spec/email7.nlp +18 -0
  59. NLPPlus/analyzers/emailaddress/spec/funcs.nlp +102 -0
  60. NLPPlus/analyzers/emailaddress/spec/kbdisp01.nlp +13 -0
  61. NLPPlus/analyzers/emailaddress/spec/kbinit.nlp +14 -0
  62. NLPPlus/analyzers/emailaddress/spec/output.nlp +11 -0
  63. NLPPlus/analyzers/emailaddress/tmp/README.md +1 -0
  64. NLPPlus/analyzers/links/README.md +21 -0
  65. NLPPlus/analyzers/links/input/text.txt +19 -0
  66. NLPPlus/analyzers/links/kb/user/attr.kb +254 -0
  67. NLPPlus/analyzers/links/kb/user/country.dict +264 -0
  68. NLPPlus/analyzers/links/kb/user/domain.dict +1134 -0
  69. NLPPlus/analyzers/links/kb/user/hier.kb +756 -0
  70. NLPPlus/analyzers/links/kb/user/phr.kb +3 -0
  71. NLPPlus/analyzers/links/kb/user/schemelist.dict +39 -0
  72. NLPPlus/analyzers/links/kb/user/word.kb +57 -0
  73. NLPPlus/analyzers/links/spec/KBFuncs.nlp +444 -0
  74. NLPPlus/analyzers/links/spec/Lines.nlp +21 -0
  75. NLPPlus/analyzers/links/spec/Link1.nlp +17 -0
  76. NLPPlus/analyzers/links/spec/Link2.nlp +27 -0
  77. NLPPlus/analyzers/links/spec/Link3.nlp +16 -0
  78. NLPPlus/analyzers/links/spec/Link4.nlp +32 -0
  79. NLPPlus/analyzers/links/spec/Link5.nlp +115 -0
  80. NLPPlus/analyzers/links/spec/Link6.nlp +76 -0
  81. NLPPlus/analyzers/links/spec/Link7.nlp +24 -0
  82. NLPPlus/analyzers/links/spec/Link8.nlp +12 -0
  83. NLPPlus/analyzers/links/spec/Links.nlp +52 -0
  84. NLPPlus/analyzers/links/spec/Links3.nlp +21 -0
  85. NLPPlus/analyzers/links/spec/Links41.nlp +30 -0
  86. NLPPlus/analyzers/links/spec/RemoveWhiteSpace.nlp +20 -0
  87. NLPPlus/analyzers/links/spec/analyzer.seq +16 -0
  88. NLPPlus/analyzers/links/spec/funcs.nlp +88 -0
  89. NLPPlus/analyzers/links/spec/kbdisp00.nlp +11 -0
  90. NLPPlus/analyzers/links/spec/kbinit.nlp +12 -0
  91. NLPPlus/analyzers/links/spec/links1.nlp +14 -0
  92. NLPPlus/analyzers/links/spec/linksphno.nlp +34 -0
  93. NLPPlus/analyzers/links/spec/output.nlp +11 -0
  94. NLPPlus/analyzers/links/spec/removeblankline.nlp +15 -0
  95. NLPPlus/analyzers/links/tmp/README.md +1 -0
  96. NLPPlus/analyzers/parse-en-us/LICENSE +21 -0
  97. NLPPlus/analyzers/parse-en-us/README.md +7 -0
  98. NLPPlus/analyzers/parse-en-us/input/text.txt +1 -0
  99. NLPPlus/analyzers/parse-en-us/kb/user/attr.kb +254 -0
  100. NLPPlus/analyzers/parse-en-us/kb/user/en-full.dict +191544 -0
  101. NLPPlus/analyzers/parse-en-us/kb/user/hier.kb +774 -0
  102. NLPPlus/analyzers/parse-en-us/kb/user/phr.kb +3 -0
  103. NLPPlus/analyzers/parse-en-us/kb/user/word.kb +39 -0
  104. NLPPlus/analyzers/parse-en-us/spec/CYCLE_0.nlp +14 -0
  105. NLPPlus/analyzers/parse-en-us/spec/CYCLE_1.nlp +12 -0
  106. NLPPlus/analyzers/parse-en-us/spec/CYCLE_2.nlp +14 -0
  107. NLPPlus/analyzers/parse-en-us/spec/KBFuncs.nlp +304 -0
  108. NLPPlus/analyzers/parse-en-us/spec/LINES_nosp.nlp +30 -0
  109. NLPPlus/analyzers/parse-en-us/spec/Lines.nlp +21 -0
  110. NLPPlus/analyzers/parse-en-us/spec/analyzer.seq +136 -0
  111. NLPPlus/analyzers/parse-en-us/spec/anaphora100.nlp +160 -0
  112. NLPPlus/analyzers/parse-en-us/spec/buff_out.nlp +116 -0
  113. NLPPlus/analyzers/parse-en-us/spec/caps100.nlp +173 -0
  114. NLPPlus/analyzers/parse-en-us/spec/caps50.nlp +654 -0
  115. NLPPlus/analyzers/parse-en-us/spec/city.nlp +1247 -0
  116. NLPPlus/analyzers/parse-en-us/spec/clause100.nlp +32 -0
  117. NLPPlus/analyzers/parse-en-us/spec/clause200.nlp +24 -0
  118. NLPPlus/analyzers/parse-en-us/spec/clause300.nlp +174 -0
  119. NLPPlus/analyzers/parse-en-us/spec/clause400.nlp +105 -0
  120. NLPPlus/analyzers/parse-en-us/spec/clause_out.nlp +36 -0
  121. NLPPlus/analyzers/parse-en-us/spec/clause_pos.nlp +100 -0
  122. NLPPlus/analyzers/parse-en-us/spec/clausesem.nlp +28 -0
  123. NLPPlus/analyzers/parse-en-us/spec/common.nlp +2905 -0
  124. NLPPlus/analyzers/parse-en-us/spec/country.nlp +79 -0
  125. NLPPlus/analyzers/parse-en-us/spec/date.nlp +269 -0
  126. NLPPlus/analyzers/parse-en-us/spec/dictfix.nlp +772 -0
  127. NLPPlus/analyzers/parse-en-us/spec/displayKB.nlp +13 -0
  128. NLPPlus/analyzers/parse-en-us/spec/doc.nlp +151 -0
  129. NLPPlus/analyzers/parse-en-us/spec/dom100.nlp +154 -0
  130. NLPPlus/analyzers/parse-en-us/spec/dom150.nlp +243 -0
  131. NLPPlus/analyzers/parse-en-us/spec/dom175.nlp +592 -0
  132. NLPPlus/analyzers/parse-en-us/spec/dom200.nlp +2810 -0
  133. NLPPlus/analyzers/parse-en-us/spec/domfuns.nlp +170 -0
  134. NLPPlus/analyzers/parse-en-us/spec/dqan100.nlp +442 -0
  135. NLPPlus/analyzers/parse-en-us/spec/dqan200.nlp +181 -0
  136. NLPPlus/analyzers/parse-en-us/spec/entity100.nlp +314 -0
  137. NLPPlus/analyzers/parse-en-us/spec/feat.nlp +37 -0
  138. NLPPlus/analyzers/parse-en-us/spec/feat100.nlp +248 -0
  139. NLPPlus/analyzers/parse-en-us/spec/fin.nlp +59 -0
  140. NLPPlus/analyzers/parse-en-us/spec/fnretok.nlp +187 -0
  141. NLPPlus/analyzers/parse-en-us/spec/fnword.nlp +1411 -0
  142. NLPPlus/analyzers/parse-en-us/spec/funs.nlp +5923 -0
  143. NLPPlus/analyzers/parse-en-us/spec/hilite_alpha.nlp +22 -0
  144. NLPPlus/analyzers/parse-en-us/spec/hilite_clause.nlp +42 -0
  145. NLPPlus/analyzers/parse-en-us/spec/hilite_ne.nlp +30 -0
  146. NLPPlus/analyzers/parse-en-us/spec/hilite_np.nlp +27 -0
  147. NLPPlus/analyzers/parse-en-us/spec/hilite_pos.nlp +24 -0
  148. NLPPlus/analyzers/parse-en-us/spec/hilite_postag.nlp +26 -0
  149. NLPPlus/analyzers/parse-en-us/spec/hilite_spatial.nlp +35 -0
  150. NLPPlus/analyzers/parse-en-us/spec/hilite_temporal.nlp +41 -0
  151. NLPPlus/analyzers/parse-en-us/spec/hilite_undone.nlp +33 -0
  152. NLPPlus/analyzers/parse-en-us/spec/inc100.nlp +917 -0
  153. NLPPlus/analyzers/parse-en-us/spec/inc300.nlp +15 -0
  154. NLPPlus/analyzers/parse-en-us/spec/incap100.nlp +165 -0
  155. NLPPlus/analyzers/parse-en-us/spec/inclausesem.nlp +44 -0
  156. NLPPlus/analyzers/parse-en-us/spec/ini.nlp +139 -0
  157. NLPPlus/analyzers/parse-en-us/spec/jdfasd.nlp +18 -0
  158. NLPPlus/analyzers/parse-en-us/spec/kb_geo.nlp +62 -0
  159. NLPPlus/analyzers/parse-en-us/spec/kb_onto.nlp +35 -0
  160. NLPPlus/analyzers/parse-en-us/spec/kbload.nlp +2597 -0
  161. NLPPlus/analyzers/parse-en-us/spec/lex_unambig.nlp +67 -0
  162. NLPPlus/analyzers/parse-en-us/spec/lex_unambig2.nlp +54 -0
  163. NLPPlus/analyzers/parse-en-us/spec/location100.nlp +179 -0
  164. NLPPlus/analyzers/parse-en-us/spec/lookup_word.nlp +84 -0
  165. NLPPlus/analyzers/parse-en-us/spec/mhbv100.nlp +404 -0
  166. NLPPlus/analyzers/parse-en-us/spec/ne_out.nlp +92 -0
  167. NLPPlus/analyzers/parse-en-us/spec/ne_xml.nlp +85 -0
  168. NLPPlus/analyzers/parse-en-us/spec/num.nlp +662 -0
  169. NLPPlus/analyzers/parse-en-us/spec/oldsemfuns.nlp +1004 -0
  170. NLPPlus/analyzers/parse-en-us/spec/phr100.nlp +420 -0
  171. NLPPlus/analyzers/parse-en-us/spec/phr50.nlp +160 -0
  172. NLPPlus/analyzers/parse-en-us/spec/pos10.nlp +168 -0
  173. NLPPlus/analyzers/parse-en-us/spec/pos100.nlp +466 -0
  174. NLPPlus/analyzers/parse-en-us/spec/pos200.nlp +694 -0
  175. NLPPlus/analyzers/parse-en-us/spec/pos25.nlp +3559 -0
  176. NLPPlus/analyzers/parse-en-us/spec/pos300.nlp +218 -0
  177. NLPPlus/analyzers/parse-en-us/spec/pos400.nlp +236 -0
  178. NLPPlus/analyzers/parse-en-us/spec/pos50.nlp +17226 -0
  179. NLPPlus/analyzers/parse-en-us/spec/pos75.nlp +294 -0
  180. NLPPlus/analyzers/parse-en-us/spec/pos_out.nlp +134 -0
  181. NLPPlus/analyzers/parse-en-us/spec/pos_out_noscore - Copy.nlp +210 -0
  182. NLPPlus/analyzers/parse-en-us/spec/pos_out_noscore.nlp +266 -0
  183. NLPPlus/analyzers/parse-en-us/spec/poserr.nlp +22 -0
  184. NLPPlus/analyzers/parse-en-us/spec/posfuns.nlp +2501 -0
  185. NLPPlus/analyzers/parse-en-us/spec/pre_100.nlp +38 -0
  186. NLPPlus/analyzers/parse-en-us/spec/pre_200.nlp +47 -0
  187. NLPPlus/analyzers/parse-en-us/spec/pre_300.nlp +35 -0
  188. NLPPlus/analyzers/parse-en-us/spec/pre_400.nlp +39 -0
  189. NLPPlus/analyzers/parse-en-us/spec/pre_500.nlp +43 -0
  190. NLPPlus/analyzers/parse-en-us/spec/pre_600.nlp +21 -0
  191. NLPPlus/analyzers/parse-en-us/spec/pre_badeos.nlp +33 -0
  192. NLPPlus/analyzers/parse-en-us/spec/pre_form.nlp +19 -0
  193. NLPPlus/analyzers/parse-en-us/spec/pre_zap.nlp +28 -0
  194. NLPPlus/analyzers/parse-en-us/spec/pre_zap1.nlp +21 -0
  195. NLPPlus/analyzers/parse-en-us/spec/pre_zap2.nlp +29 -0
  196. NLPPlus/analyzers/parse-en-us/spec/punct100.nlp +416 -0
  197. NLPPlus/analyzers/parse-en-us/spec/punct200.nlp +52 -0
  198. NLPPlus/analyzers/parse-en-us/spec/qclause100.nlp +495 -0
  199. NLPPlus/analyzers/parse-en-us/spec/qclause200.nlp +57 -0
  200. NLPPlus/analyzers/parse-en-us/spec/qclause300.nlp +39 -0
  201. NLPPlus/analyzers/parse-en-us/spec/qclause50.nlp +465 -0
  202. NLPPlus/analyzers/parse-en-us/spec/qclause75.nlp +78 -0
  203. NLPPlus/analyzers/parse-en-us/spec/qconj100.nlp +78 -0
  204. NLPPlus/analyzers/parse-en-us/spec/qconj200.nlp +92 -0
  205. NLPPlus/analyzers/parse-en-us/spec/qline100.nlp +49 -0
  206. NLPPlus/analyzers/parse-en-us/spec/qseg100.nlp +134 -0
  207. NLPPlus/analyzers/parse-en-us/spec/qseg125.nlp +40 -0
  208. NLPPlus/analyzers/parse-en-us/spec/qseg150.nlp +115 -0
  209. NLPPlus/analyzers/parse-en-us/spec/qseg200.nlp +126 -0
  210. NLPPlus/analyzers/parse-en-us/spec/qsemfuns.nlp +63 -0
  211. NLPPlus/analyzers/parse-en-us/spec/qsent100.nlp +178 -0
  212. NLPPlus/analyzers/parse-en-us/spec/qsent50.nlp +522 -0
  213. NLPPlus/analyzers/parse-en-us/spec/qsent75.nlp +157 -0
  214. NLPPlus/analyzers/parse-en-us/spec/quotes100.nlp +61 -0
  215. NLPPlus/analyzers/parse-en-us/spec/rule_out.nlp +161 -0
  216. NLPPlus/analyzers/parse-en-us/spec/seg100.nlp +335 -0
  217. NLPPlus/analyzers/parse-en-us/spec/semfuns.nlp +2100 -0
  218. NLPPlus/analyzers/parse-en-us/spec/sent100.nlp +44 -0
  219. NLPPlus/analyzers/parse-en-us/spec/sent125.nlp +23 -0
  220. NLPPlus/analyzers/parse-en-us/spec/sent200.nlp +97 -0
  221. NLPPlus/analyzers/parse-en-us/spec/sent250.nlp +54 -0
  222. NLPPlus/analyzers/parse-en-us/spec/sent300.nlp +32 -0
  223. NLPPlus/analyzers/parse-en-us/spec/sent400.nlp +525 -0
  224. NLPPlus/analyzers/parse-en-us/spec/sent50.nlp +24 -0
  225. NLPPlus/analyzers/parse-en-us/spec/sent_pos.nlp +105 -0
  226. NLPPlus/analyzers/parse-en-us/spec/sentsem.nlp +27 -0
  227. NLPPlus/analyzers/parse-en-us/spec/study100.nlp +54 -0
  228. NLPPlus/analyzers/parse-en-us/spec/tag100.nlp +100 -0
  229. NLPPlus/analyzers/parse-en-us/spec/tag50.nlp +28 -0
  230. NLPPlus/analyzers/parse-en-us/spec/tags100.nlp +60 -0
  231. NLPPlus/analyzers/parse-en-us/spec/textzone100.nlp +40 -0
  232. NLPPlus/analyzers/parse-en-us/spec/textzone50.nlp +24 -0
  233. NLPPlus/analyzers/parse-en-us/spec/tmp.seq +134 -0
  234. NLPPlus/analyzers/parse-en-us/spec/tok10.nlp +86 -0
  235. NLPPlus/analyzers/parse-en-us/spec/tok100.nlp +451 -0
  236. NLPPlus/analyzers/parse-en-us/spec/tok150.nlp +61 -0
  237. NLPPlus/analyzers/parse-en-us/spec/tok175.nlp +637 -0
  238. NLPPlus/analyzers/parse-en-us/spec/tok200.nlp +154 -0
  239. NLPPlus/analyzers/parse-en-us/spec/tok25.nlp +24 -0
  240. NLPPlus/analyzers/parse-en-us/spec/tok50.nlp +645 -0
  241. NLPPlus/analyzers/parse-en-us/spec/trav_dict.nlp +19 -0
  242. NLPPlus/analyzers/parse-en-us/spec/xmlfns.nlp +69 -0
  243. NLPPlus/analyzers/parse-en-us/spec/xmlrecursive.nlp +283 -0
  244. NLPPlus/analyzers/parse-en-us/spec/zap100.nlp +39 -0
  245. NLPPlus/analyzers/parse-en-us/spec/zaplines.nlp +21 -0
  246. NLPPlus/analyzers/parse-en-us/spec/zapwhite.nlp +20 -0
  247. NLPPlus/analyzers/parse-en-us/tmp/README.md +1 -0
  248. NLPPlus/analyzers/telephone/README.md +21 -0
  249. NLPPlus/analyzers/telephone/input/text.txt +27 -0
  250. NLPPlus/analyzers/telephone/kb/user/attr.kb +254 -0
  251. NLPPlus/analyzers/telephone/kb/user/hier.kb +756 -0
  252. NLPPlus/analyzers/telephone/kb/user/phr.kb +3 -0
  253. NLPPlus/analyzers/telephone/kb/user/word.kb +57 -0
  254. NLPPlus/analyzers/telephone/spec/KBFuncs.nlp +444 -0
  255. NLPPlus/analyzers/telephone/spec/Lines.nlp +21 -0
  256. NLPPlus/analyzers/telephone/spec/Telep1.nlp +194 -0
  257. NLPPlus/analyzers/telephone/spec/Telep2.nlp +16 -0
  258. NLPPlus/analyzers/telephone/spec/analyzer.seq +9 -0
  259. NLPPlus/analyzers/telephone/spec/funcs.nlp +72 -0
  260. NLPPlus/analyzers/telephone/spec/kbdisp01.nlp +13 -0
  261. NLPPlus/analyzers/telephone/spec/kbinit.nlp +11 -0
  262. NLPPlus/analyzers/telephone/spec/output.nlp +11 -0
  263. NLPPlus/analyzers/telephone/spec/tele1.nlp +15 -0
  264. NLPPlus/analyzers/telephone/tmp/README.md +1 -0
  265. NLPPlus/bindings.cp312-win_amd64.pyd +0 -0
  266. NLPPlus/data/rfb/spec/Copy of decl.nlp +15 -0
  267. NLPPlus/data/rfb/spec/actions.nlp +44 -0
  268. NLPPlus/data/rfb/spec/analyzer.seq +36 -0
  269. NLPPlus/data/rfb/spec/bigtok.nlp +132 -0
  270. NLPPlus/data/rfb/spec/checks.nlp +17 -0
  271. NLPPlus/data/rfb/spec/code.nlp +36 -0
  272. NLPPlus/data/rfb/spec/components.nlp +60 -0
  273. NLPPlus/data/rfb/spec/decl.nlp +36 -0
  274. NLPPlus/data/rfb/spec/decls.nlp +37 -0
  275. NLPPlus/data/rfb/spec/element.nlp +19 -0
  276. NLPPlus/data/rfb/spec/finalerr.nlp +22 -0
  277. NLPPlus/data/rfb/spec/gram1.nlp +50 -0
  278. NLPPlus/data/rfb/spec/gram2-saf.nlp +250 -0
  279. NLPPlus/data/rfb/spec/gram2.nlp +484 -0
  280. NLPPlus/data/rfb/spec/gram3.nlp +11 -0
  281. NLPPlus/data/rfb/spec/gram4.nlp +51 -0
  282. NLPPlus/data/rfb/spec/gram5.nlp +99 -0
  283. NLPPlus/data/rfb/spec/list.nlp +30 -0
  284. NLPPlus/data/rfb/spec/list1.nlp +44 -0
  285. NLPPlus/data/rfb/spec/multi.nlp +15 -0
  286. NLPPlus/data/rfb/spec/nlppp.nlp +129 -0
  287. NLPPlus/data/rfb/spec/nodes.nlp +15 -0
  288. NLPPlus/data/rfb/spec/pair.nlp +41 -0
  289. NLPPlus/data/rfb/spec/pairs.nlp +28 -0
  290. NLPPlus/data/rfb/spec/path.nlp +15 -0
  291. NLPPlus/data/rfb/spec/posts.nlp +16 -0
  292. NLPPlus/data/rfb/spec/preaction.nlp +16 -0
  293. NLPPlus/data/rfb/spec/pres.nlp +17 -0
  294. NLPPlus/data/rfb/spec/recurse.nlp +15 -0
  295. NLPPlus/data/rfb/spec/recurses.nlp +15 -0
  296. NLPPlus/data/rfb/spec/region.nlp +16 -0
  297. NLPPlus/data/rfb/spec/regions.nlp +15 -0
  298. NLPPlus/data/rfb/spec/retok.nlp +78 -0
  299. NLPPlus/data/rfb/spec/rule.nlp +80 -0
  300. NLPPlus/data/rfb/spec/rules.nlp +17 -0
  301. NLPPlus/data/rfb/spec/rulesfile.nlp +29 -0
  302. NLPPlus/data/rfb/spec/select.nlp +17 -0
  303. NLPPlus/data/rfb/spec/tmp.nlp +22 -0
  304. NLPPlus/data/rfb/spec/tmp.seq +36 -0
  305. NLPPlus/data/rfb/spec/tmp1.nlp +16 -0
  306. NLPPlus/data/rfb/spec/un_mark.nlp +16 -0
  307. NLPPlus/data/rfb/spec/x_commas.nlp +15 -0
  308. NLPPlus/data/rfb/spec/x_white.nlp +15 -0
  309. nlpplus-0.2.1.dev0.dist-info/DELVEWHEEL +2 -0
  310. nlpplus-0.2.1.dev0.dist-info/METADATA +366 -0
  311. nlpplus-0.2.1.dev0.dist-info/RECORD +316 -0
  312. nlpplus-0.2.1.dev0.dist-info/WHEEL +5 -0
  313. nlpplus-0.2.1.dev0.dist-info/licenses/LICENSE +21 -0
  314. nlpplus.libs/icudt74-e54637e981e8ad0e2924a36b098eca85.dll +0 -0
  315. nlpplus.libs/icuuc74-58eed1468d41a1aade642f0a4d35e288.dll +0 -0
  316. nlpplus.libs/msvcp140-7aa1abc2104cf7828b64f83afacc0c7e.dll +0 -0
NLPPlus/__init__.py ADDED
@@ -0,0 +1,204 @@
1
+ """Python extension for NLP++ text analysis engine.
2
+
3
+ Basic usage:
4
+
5
+ import NLPPlus
6
+ xml = NLPPlus.analyze("This is some text to be parsed")
7
+ print(xml)
8
+
9
+ """
10
+
11
+
12
+ # start delvewheel patch
13
+ def _delvewheel_patch_1_10_0():
14
+ import os
15
+ if os.path.isdir(libs_dir := os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, 'nlpplus.libs'))):
16
+ os.add_dll_directory(libs_dir)
17
+
18
+
19
+ _delvewheel_patch_1_10_0()
20
+ del _delvewheel_patch_1_10_0
21
+ # end delvewheel patch
22
+
23
+ import json
24
+ import logging
25
+ from shutil import copytree, rmtree
26
+ from tempfile import TemporaryDirectory
27
+ from os import PathLike, getcwd
28
+ from pathlib import Path
29
+ from typing import Optional, Any
30
+ import os
31
+ import glob
32
+
33
+ from .bindings import NLP_ENGINE # type: ignore
34
+
35
+ LOGGER = logging.getLogger("NLPPlus")
36
+
37
+
38
+ def maybe_readfile(path: Path) -> Optional[str]:
39
+ """Bogus utility function to maybe read a file."""
40
+ if not path.exists():
41
+ return None
42
+ with open(path, "rt") as infh:
43
+ return infh.read()
44
+
45
+
46
+ class EngineException(BaseException):
47
+ pass
48
+
49
+
50
+ class Results:
51
+ """Various results produced by the NLP++ analyzer."""
52
+
53
+ def __init__(self, outtext: str, outdir: PathLike):
54
+ LOGGER.info("Reading output from %s", outdir)
55
+ self.output_text = outtext
56
+ self.outdir = Path(outdir)
57
+
58
+ @property
59
+ def final_tree(self) -> Optional[str]:
60
+ """The final parse tree, if any was produced."""
61
+ return maybe_readfile(self.outdir / "final.tree")
62
+
63
+ @property
64
+ def output_json(self) -> Optional[str]:
65
+ """The output JSON text, if any was produced."""
66
+ return maybe_readfile(self.outdir / "output.json")
67
+
68
+ @property
69
+ def output(self) -> Optional[Any]:
70
+ """The parsed output Json, if any was produced"""
71
+ output_json = self.output_json
72
+ if output_json is not None:
73
+ return json.loads(output_json)
74
+ return None
75
+
76
+
77
+ class Engine:
78
+ """NLP++ Engine for a given working folder.
79
+
80
+ Args:
81
+
82
+ working_folder(optional, PathLike): Working folder for this
83
+ instance. If None, a temporary directory will be created
84
+ and initialized with the default analyzers. Otherwise,
85
+ this must contain an `analyzers` and a `data` folder,
86
+ unless `initialize` is `True`.
87
+ verbose(optional, bool): Be more verbose.
88
+ initialize(optional, bool): Initialize `working_folder` with
89
+ the default analyzers.
90
+ """
91
+ def __init__(
92
+ self,
93
+ working_folder: Optional[PathLike] = None,
94
+ analyzer_path: str = None,
95
+ verbose: bool = False,
96
+ initialize: bool = False,
97
+ ):
98
+ if working_folder is None:
99
+ self.tmpdir = TemporaryDirectory(prefix="NLPPlus-")
100
+ self.working_folder = Path(self.tmpdir.name)
101
+ initialize = True
102
+ else:
103
+ self.tmpdir = None
104
+ self.working_folder = Path(working_folder)
105
+ self.analyzer_path = None
106
+ if initialize:
107
+ copytree(
108
+ Path(__file__).parent / "analyzers", self.working_folder / "analyzers"
109
+ )
110
+ copytree(Path(__file__).parent / "data", self.working_folder / "data")
111
+ LOGGER.info("Initialized working folder in %s", self.working_folder)
112
+ if not (self.working_folder / "analyzers").is_dir():
113
+ raise EngineException(
114
+ f"analyzers directory not found in folder '{working_folder}'"
115
+ )
116
+ if not (self.working_folder / "data").is_dir():
117
+ raise EngineException(
118
+ f"data directory not found in folder '{working_folder}'"
119
+ )
120
+ self.engine = NLP_ENGINE(str(self.working_folder), silent=not verbose)
121
+
122
+ def analyze(self, text: str, analyzer_name: str, develop: bool = False) -> Results:
123
+ """Analyze text with the named analyzer."""
124
+ analyzer_name = Path(analyzer_name)
125
+ outdir = self.working_folder / "analyzers" / analyzer_name / "output"
126
+ if self.analyzer_path:
127
+ analyzer_name = Path(self.analyzer_path) / analyzer_name
128
+ outdir = Path(self.analyzer_path) / "analyzers" / analyzer_name / "output"
129
+ # Delete all files in the outdir
130
+ file_list = glob.glob(str(outdir / "*"))
131
+ for file_path in file_list:
132
+ os.remove(file_path)
133
+ outtext = self.engine.analyze(str(analyzer_name), text, develop)
134
+ return Results(outtext, outdir)
135
+
136
+ def input_text(self, analyzer_name: str, file_name: str) -> str:
137
+ """Return the text from a file in the input directory."""
138
+ file_path = Path(self.analyzer_path) / analyzer_name / "input" / file_name
139
+ if not file_path.is_file():
140
+ raise EngineException(
141
+ f"File not found in input directory '{file_path}'"
142
+ )
143
+ with open(file_path, "rt", encoding="utf-8") as file:
144
+ text = file.read()
145
+ return text
146
+
147
+ def set_analyzers_folder(self, analyzer_name: str):
148
+ """Set analyzers directory path."""
149
+ self.analyzer_path = analyzer_name
150
+
151
+ def copy_library_analyzers(self, to_dir: str, overwrite: bool=True):
152
+ """Copy the library files to a directory."""
153
+ copy_it = True
154
+
155
+ if os.path.exists(to_dir):
156
+ if overwrite:
157
+ rmtree(to_dir)
158
+ else:
159
+ copy_it = False
160
+
161
+ if copy_it:
162
+ copytree(
163
+ Path(__file__).parent / "analyzers", Path(to_dir)
164
+ )
165
+ self.analyzer_path = str(to_dir)
166
+
167
+
168
+ engine = Engine()
169
+
170
+
171
+ def set_working_folder(working_folder: Optional[str] = None, initialize: bool = False):
172
+ """Reinitialize the NLP++ engine with a different working folder.
173
+
174
+ Args:
175
+
176
+ working_folder(str): Working folder to use, or `None` to use the
177
+ current working directory.
178
+ initialize(bool): Initialize the new working folder with the built-in
179
+ analyzers and data. (Optional, default=False)
180
+ """
181
+ global engine
182
+ if working_folder is None:
183
+ working_folder = getcwd()
184
+ engine = Engine(Path(working_folder), initialize=initialize)
185
+
186
+
187
+ def copy_library_analyzers(analyzer_folder_path: str, overwrite=True):
188
+ """Run the analyzer named on the input string."""
189
+ engine.copy_library_analyzers(analyzer_folder_path, overwrite)
190
+
191
+
192
+ def set_analyzers_folder(analyzer_folder_path: str):
193
+ """Run the analyzer named on the input string."""
194
+ engine.set_analyzers_folder(analyzer_folder_path)
195
+
196
+
197
+ def analyze(text: str, parser: str = "parse-en-us", develop: bool = False) -> str:
198
+ """Run the analyzer named on the input string."""
199
+ return engine.analyze(text, parser, develop).output_text
200
+
201
+
202
+ def input_text(analyzer_name: str, file_name: str):
203
+ """Return the text from a file in the input directory."""
204
+ return engine.intput_text(analyzer_name, file_name)
NLPPlus/_version.py ADDED
@@ -0,0 +1,21 @@
1
+ # file generated by setuptools-scm
2
+ # don't change, don't track in version control
3
+
4
+ __all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]
5
+
6
+ TYPE_CHECKING = False
7
+ if TYPE_CHECKING:
8
+ from typing import Tuple
9
+ from typing import Union
10
+
11
+ VERSION_TUPLE = Tuple[Union[int, str], ...]
12
+ else:
13
+ VERSION_TUPLE = object
14
+
15
+ version: str
16
+ __version__: str
17
+ __version_tuple__: VERSION_TUPLE
18
+ version_tuple: VERSION_TUPLE
19
+
20
+ __version__ = version = '0.2.1.dev0'
21
+ __version_tuple__ = version_tuple = (0, 2, 1, 'dev0')
@@ -0,0 +1,12 @@
1
+ # ADDRESS PARSER
2
+
3
+ This is an NLP++ Analyzer that parses through text and identifies addresses(in USPS formats) listed anywhere in the text.
4
+
5
+ From the addresses, the following information is extracted(based on the type of address all or some of this information is extracted):
6
+ House number, Street Number, Street Name, Street Suffix(like ST- for street),Street type(like Lane or Road), city, state, pincode, type of address.
7
+
8
+ Additionally Rural Route and Highway Contract addresses are also parsed form which the information of Higway contract number/Rural Route and the Post box number is extracted.
9
+
10
+ All this information is made available in the json format. A sample output can be found(for the sample text) in input/text.text_log/output.json.
11
+
12
+ To run the analyzer, create a text file in input folder consisting of the text to be parsed.
@@ -0,0 +1,24 @@
1
+ The address is 123 Main Street,345 Wyoming chanel Cityville, 64775 Country .
2
+ Located at 456 Oak Street, Townsville, 24512 USA.
3
+ John Smith resides in Apartment 789, Pine Towers,76 sde 45114 Canada.
4
+ She's living at 987 Elm Lane, Riverside, Canada 14521.
5
+ Dwelling at 654 Cedar Road, Hamletsville, 15451 India.
6
+ My home address is 876 Pine Circle, Mountainside, 51873 Brazil.
7
+ Here is my address - 234 Willow Street, Hilltop, 48929 South Africa.
8
+ Find me at 543 Redwood Lane, Lakeside,38849 Mexico .
9
+ His residence is 321 Maple Avenue, Villageton, 56234 UK .
10
+ We stay at 789 Birch Place, Meadowville, New Zealand 34245.
11
+ 12 1ST ST NW
12
+ HAMPTON IA 50441-1902
13
+ BG LIGHT CO
14
+ HC 72 BOX 293 A
15
+ DULUTH MN 55811-9702
16
+ ATTN MS LUCY MARTIN
17
+ XYZ CORPORATION
18
+ 4321 OAK ST
19
+ OAKTON MD 12345-6789
20
+ You can reach me at 456 Maple Road, Suburbia, France 34245.
21
+ Come to 987 Oak Lane, Riverside, Canada 34235.
22
+ Check out 876 Pine Circle, Mountainside, Brazil 32345.
23
+ Living in 543 Redwood Lane, Lakeside, Mexico 34415.
24
+ At this location, you'll find 654 Cedar Road, Hamletsville, Australia 34213.
@@ -0,0 +1,196 @@
1
+ Afghanistan country=1
2
+ Albania country=1
3
+ Algeria country=1
4
+ Andorra country=1
5
+ Angola country=1
6
+ Antigua country=1
7
+ Argentina country=1
8
+ Armenia country=1
9
+ Australia country=1
10
+ Austria country=1
11
+ Azerbaijan country=1
12
+ Bahamas country=1
13
+ Bahrain country=1
14
+ Bangladesh country=1
15
+ Barbados country=1
16
+ Belarus country=1
17
+ Belgium country=1
18
+ Belize country=1
19
+ Benin country=1
20
+ Bhutan country=1
21
+ Bolivia country=1
22
+ Bosnia country=1
23
+ Botswana country=1
24
+ Brazil country=1
25
+ Brunei country=1
26
+ Bulgaria country=1
27
+ Burkina country=1
28
+ Burundi country=1
29
+ Cabo country=1
30
+ Cambodia country=1
31
+ Cameroon country=1
32
+ Canada country=1
33
+ Central country=1
34
+ Chad country=1
35
+ Chile country=1
36
+ China country=1
37
+ Colombia country=1
38
+ Comoros country=1
39
+ Congo country=1
40
+ Costa country=1
41
+ Croatia country=1
42
+ Cuba country=1
43
+ Cyprus country=1
44
+ Czechia country=1
45
+ Democratic country=1
46
+ Denmark country=1
47
+ Djibouti country=1
48
+ Dominica country=1
49
+ Dominican country=1
50
+ East country=1
51
+ Ecuador country=1
52
+ Egypt country=1
53
+ El country=1
54
+ Equatorial country=1
55
+ Eritrea country=1
56
+ Estonia country=1
57
+ Eswatini country=1
58
+ Ethiopia country=1
59
+ Fiji country=1
60
+ Finland country=1
61
+ France country=1
62
+ Gabon country=1
63
+ Gambia country=1
64
+ Georgia country=1
65
+ Germany country=1
66
+ Ghana country=1
67
+ Greece country=1
68
+ Grenada country=1
69
+ Guatemala country=1
70
+ Guinea country=1
71
+ Guinea-Bissau country=1
72
+ Guyana country=1
73
+ Haiti country=1
74
+ Honduras country=1
75
+ Hungary country=1
76
+ Iceland country=1
77
+ India country=1
78
+ Indonesia country=1
79
+ Iran country=1
80
+ Iraq country=1
81
+ Ireland country=1
82
+ Israel country=1
83
+ Italy country=1
84
+ Ivory country=1
85
+ Jamaica country=1
86
+ Japan country=1
87
+ Jordan country=1
88
+ Kazakhstan country=1
89
+ Kenya country=1
90
+ Kiribati country=1
91
+ Kosovo country=1
92
+ Kuwait country=1
93
+ Kyrgyzstan country=1
94
+ Laos country=1
95
+ Latvia country=1
96
+ Lebanon country=1
97
+ Lesotho country=1
98
+ Liberia country=1
99
+ Libya country=1
100
+ Liechtenstein country=1
101
+ Lithuania country=1
102
+ Luxembourg country=1
103
+ Madagascar country=1
104
+ Malawi country=1
105
+ Malaysia country=1
106
+ Maldives country=1
107
+ Mali country=1
108
+ Malta country=1
109
+ Marshall country=1
110
+ Mauritania country=1
111
+ Mauritius country=1
112
+ Mexico country=1
113
+ Micronesia country=1
114
+ Moldova country=1
115
+ Monaco country=1
116
+ Mongolia country=1
117
+ Montenegro country=1
118
+ Morocco country=1
119
+ Mozambique country=1
120
+ Myanmar country=1
121
+ Namibia country=1
122
+ Nauru country=1
123
+ Nepal country=1
124
+ Netherlands country=1
125
+ New country=1
126
+ Nicaragua country=1
127
+ Niger country=1
128
+ Nigeria country=1
129
+ North country=1
130
+ North country=1
131
+ Norway country=1
132
+ Oman country=1
133
+ Pakistan country=1
134
+ Palau country=1
135
+ Panama country=1
136
+ Papua country=1
137
+ Paraguay country=1
138
+ Peru country=1
139
+ Philippines country=1
140
+ Poland country=1
141
+ Portugal country=1
142
+ Qatar country=1
143
+ Romania country=1
144
+ Russia country=1
145
+ Rwanda country=1
146
+ Saint country=1
147
+ Saint country=1
148
+ Saint country=1
149
+ Samoa country=1
150
+ San country=1
151
+ Sao country=1
152
+ Saudi country=1
153
+ Senegal country=1
154
+ Serbia country=1
155
+ Seychelles country=1
156
+ Sierra country=1
157
+ Singapore country=1
158
+ Slovakia country=1
159
+ Slovenia country=1
160
+ Solomon country=1
161
+ Somalia country=1
162
+ South country=1
163
+ South country=1
164
+ South country=1
165
+ Spain country=1
166
+ Sri country=1
167
+ Sudan country=1
168
+ Suriname country=1
169
+ Sweden country=1
170
+ Switzerland country=1
171
+ Syria country=1
172
+ Taiwan country=1
173
+ Tajikistan country=1
174
+ Tanzania country=1
175
+ Thailand country=1
176
+ Togo country=1
177
+ Tonga country=1
178
+ Trinidad country=1
179
+ Tunisia country=1
180
+ Turkey country=1
181
+ Turkmenistan country=1
182
+ Tuvalu country=1
183
+ Uganda country=1
184
+ Ukraine country=1
185
+ UnitedStates country=1
186
+ US country=1
187
+ USA country=1
188
+ Uruguay country=1
189
+ Uzbekistan country=1
190
+ Vanuatu country=1
191
+ Vatican country=1
192
+ Venezuela country=1
193
+ Vietnam country=1
194
+ Yemen country=1
195
+ Zambia country=1
196
+ Zimbabwe country=1
@@ -0,0 +1,14 @@
1
+ address address=1
2
+ located address=1
3
+ resides address=1
4
+ living address=1
5
+ dwelling address=1
6
+ dwells address=1
7
+ lives address=1
8
+ resides address=1
9
+ residence address=1
10
+ stay address=1
11
+ staying address=1
12
+ location address=1
13
+ stayed address=1
14
+ resided address=1