nlpir 0.0.4-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (92) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +17 -0
  3. data/LICENSE.txt +22 -0
  4. data/README.md +195 -0
  5. data/Rakefile +11 -0
  6. data/bin/NLPIR.dll +0 -0
  7. data/lib/Data/BIG2GBK.map +0 -0
  8. data/lib/Data/BIG5.pdat +0 -0
  9. data/lib/Data/BIG5.wordlist +0 -0
  10. data/lib/Data/BiWord.big +0 -0
  11. data/lib/Data/Configure.xml +15 -0
  12. data/lib/Data/CoreDict.pdat +0 -0
  13. data/lib/Data/CoreDict.pos +0 -0
  14. data/lib/Data/CoreDict.unig +0 -0
  15. data/lib/Data/FieldDict.pdat +0 -0
  16. data/lib/Data/FieldDict.pos +0 -0
  17. data/lib/Data/GBK.pdat +0 -0
  18. data/lib/Data/GBK.wordlist +0 -0
  19. data/lib/Data/GBK2BIG.map +0 -0
  20. data/lib/Data/GBK2GBKC.map +0 -0
  21. data/lib/Data/GBK2UTF.map +0 -0
  22. data/lib/Data/GBKA.pdat +0 -0
  23. data/lib/Data/GBKA.wordlist +0 -0
  24. data/lib/Data/GBKA2UTF.map +0 -0
  25. data/lib/Data/GBKC.pdat +0 -0
  26. data/lib/Data/GBKC.wordlist +0 -0
  27. data/lib/Data/GBKC2GBK.map +0 -0
  28. data/lib/Data/GranDict.pdat +3369 -8
  29. data/lib/Data/GranDict.pos +0 -0
  30. data/lib/Data/ICTPOS.map +96 -0
  31. data/lib/Data/NLPIR.ctx +0 -0
  32. data/lib/Data/NLPIR.user +0 -0
  33. data/lib/Data/NLPIR_First.map +96 -0
  34. data/lib/Data/NewWord.lst +25 -0
  35. data/lib/Data/PKU.map +96 -0
  36. data/lib/Data/PKU_First.map +96 -0
  37. data/lib/Data/UTF2GBK.map +0 -0
  38. data/lib/Data/UTF2GBKA.map +0 -0
  39. data/lib/Data/UTF8.pdat +0 -0
  40. data/lib/Data/UTF8.wordlist +0 -0
  41. data/lib/Data/UserDict.pdat +0 -0
  42. data/lib/Data/charset.type +0 -0
  43. data/lib/Data/nr.ctx +0 -0
  44. data/lib/Data/nr.fsa +0 -0
  45. data/lib/Data/nr.role +0 -0
  46. data/lib/nlpir/version.rb +3 -0
  47. data/lib/nlpir.rb +275 -0
  48. data/nlpir.gemspec +25 -0
  49. data/test/Data/BIG2GBK.map +0 -0
  50. data/test/Data/BIG5.pdat +0 -0
  51. data/test/Data/BIG5.wordlist +0 -0
  52. data/test/Data/BiWord.big +0 -0
  53. data/test/Data/Configure.xml +15 -0
  54. data/test/Data/CoreDict.pdat +0 -0
  55. data/test/Data/CoreDict.pos +0 -0
  56. data/test/Data/CoreDict.unig +0 -0
  57. data/test/Data/FieldDict.pdat +0 -0
  58. data/test/Data/FieldDict.pos +0 -0
  59. data/test/Data/GBK.pdat +0 -0
  60. data/test/Data/GBK.wordlist +0 -0
  61. data/test/Data/GBK2BIG.map +0 -0
  62. data/test/Data/GBK2GBKC.map +0 -0
  63. data/test/Data/GBK2UTF.map +0 -0
  64. data/test/Data/GBKA.pdat +0 -0
  65. data/test/Data/GBKA.wordlist +0 -0
  66. data/test/Data/GBKA2UTF.map +0 -0
  67. data/test/Data/GBKC.pdat +0 -0
  68. data/test/Data/GBKC.wordlist +0 -0
  69. data/test/Data/GBKC2GBK.map +0 -0
  70. data/test/Data/GranDict.pdat +3369 -8
  71. data/test/Data/GranDict.pos +0 -0
  72. data/test/Data/ICTPOS.map +96 -0
  73. data/test/Data/NLPIR.ctx +0 -0
  74. data/test/Data/NLPIR.user +0 -0
  75. data/test/Data/NLPIR_First.map +96 -0
  76. data/test/Data/NewWord.lst +73 -0
  77. data/test/Data/PKU.map +96 -0
  78. data/test/Data/PKU_First.map +96 -0
  79. data/test/Data/UTF2GBK.map +0 -0
  80. data/test/Data/UTF2GBKA.map +0 -0
  81. data/test/Data/UTF8.pdat +0 -0
  82. data/test/Data/UTF8.wordlist +0 -0
  83. data/test/Data/UserDict.pdat +0 -0
  84. data/test/Data/charset.type +0 -0
  85. data/test/Data/nr.ctx +0 -0
  86. data/test/Data/nr.fsa +0 -0
  87. data/test/Data/nr.role +0 -0
  88. data/test/test.txt +52 -0
  89. data/test/test_nlpir.rb +158 -0
  90. data/test/test_result.txt +87 -0
  91. data/test/userdict.txt +5 -0
  92. metadata +206 -0
Binary file
@@ -0,0 +1,96 @@
1
+ 1
2
+ 4
3
+ a
4
+ ad
5
+ ag
6
+ al
7
+ an
8
+ b
9
+ bl
10
+ c
11
+ cc
12
+ d
13
+ dg
14
+ dl
15
+ e
16
+ f
17
+ h
18
+ k
19
+ m
20
+ Mg
21
+ mq
22
+ n
23
+ ng
24
+ nl
25
+ nr
26
+ nr1
27
+ nr2
28
+ nrf
29
+ nrj
30
+ ns
31
+ nsf
32
+ nt
33
+ nz
34
+ o
35
+ p
36
+ pba
37
+ pbei
38
+ q
39
+ qt
40
+ qv
41
+ r
42
+ Rg
43
+ rr
44
+ ry
45
+ rys
46
+ ryt
47
+ ryv
48
+ rz
49
+ rzs
50
+ rzt
51
+ rzv
52
+ s
53
+ t
54
+ tg
55
+ u
56
+ ude1
57
+ ude2
58
+ ude3
59
+ udeng
60
+ udh
61
+ uguo
62
+ ule
63
+ ulian
64
+ uls
65
+ usuo
66
+ uyy
67
+ uzhe
68
+ uzhi
69
+ v
70
+ vd
71
+ vf
72
+ vg
73
+ vi
74
+ vl
75
+ vn
76
+ vshi
77
+ vx
78
+ vyou
79
+ w
80
+ wb
81
+ wd
82
+ wf
83
+ wj
84
+ wky
85
+ wkz
86
+ wm
87
+ wn
88
+ wp
89
+ ws
90
+ wt
91
+ ww
92
+ wyy
93
+ wyz
94
+ x
95
+ y
96
+ z
Binary file
Binary file
@@ -0,0 +1,96 @@
1
+ 1
2
+ 4
3
+ a
4
+ a
5
+ a
6
+ a
7
+ a
8
+ b
9
+ b
10
+ c
11
+ c
12
+ d
13
+ d
14
+ d
15
+ e
16
+ f
17
+ h
18
+ k
19
+ m
20
+ m
21
+ m
22
+ n
23
+ n
24
+ n
25
+ n
26
+ n
27
+ n
28
+ n
29
+ n
30
+ n
31
+ n
32
+ n
33
+ n
34
+ o
35
+ p
36
+ p
37
+ p
38
+ q
39
+ q
40
+ q
41
+ r
42
+ R
43
+ r
44
+ r
45
+ r
46
+ r
47
+ r
48
+ r
49
+ r
50
+ r
51
+ r
52
+ s
53
+ t
54
+ t
55
+ u
56
+ u
57
+ u
58
+ u
59
+ u
60
+ u
61
+ u
62
+ u
63
+ u
64
+ u
65
+ u
66
+ u
67
+ u
68
+ u
69
+ v
70
+ v
71
+ v
72
+ v
73
+ v
74
+ v
75
+ v
76
+ v
77
+ v
78
+ v
79
+ w
80
+ w
81
+ w
82
+ w
83
+ w
84
+ w
85
+ w
86
+ w
87
+ w
88
+ w
89
+ w
90
+ w
91
+ w
92
+ w
93
+ w
94
+ x
95
+ y
96
+ z
@@ -0,0 +1,25 @@
1
+ ��˿ ���� �⹹ ��Q �������Ļ� ���� Ⱥ���Գ� ���ݱ�΢
2
+ ��˿ ���� �⹹ ��Q �������Ļ� ���� Ⱥ���Գ� ���ݱ�΢
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+
13
+
14
+
15
+
16
+
17
+
18
+
19
+
20
+
21
+
22
+
23
+
24
+
25
+
data/lib/Data/PKU.map ADDED
@@ -0,0 +1,96 @@
1
+ 1
2
+ 4
3
+ a
4
+ ad
5
+ g
6
+ l
7
+ an
8
+ b
9
+ l
10
+ c
11
+ cc
12
+ d
13
+ g
14
+ l
15
+ e
16
+ f
17
+ h
18
+ k
19
+ m
20
+ Mg
21
+ mq
22
+ n
23
+ g
24
+ l
25
+ nr
26
+ nr
27
+ nr
28
+ nr
29
+ nr
30
+ ns
31
+ ns
32
+ nt
33
+ nz
34
+ o
35
+ p
36
+ p
37
+ p
38
+ q
39
+ qt
40
+ qv
41
+ r
42
+ Rg
43
+ r
44
+ r
45
+ r
46
+ r
47
+ r
48
+ r
49
+ r
50
+ r
51
+ r
52
+ s
53
+ t
54
+ tg
55
+ u
56
+ u
57
+ u
58
+ u
59
+ u
60
+ u
61
+ u
62
+ u
63
+ u
64
+ u
65
+ u
66
+ u
67
+ u
68
+ u
69
+ v
70
+ v
71
+ v
72
+ g
73
+ v
74
+ v
75
+ vn
76
+ v
77
+ v
78
+ v
79
+ w
80
+ w
81
+ w
82
+ w
83
+ w
84
+ w
85
+ w
86
+ w
87
+ w
88
+ w
89
+ w
90
+ w
91
+ w
92
+ w
93
+ w
94
+ x
95
+ y
96
+ z
@@ -0,0 +1,96 @@
1
+ 1
2
+ 4
3
+ a
4
+ a
5
+ g
6
+ l
7
+ a
8
+ b
9
+ l
10
+ c
11
+ c
12
+ d
13
+ g
14
+ l
15
+ e
16
+ f
17
+ h
18
+ k
19
+ m
20
+ m
21
+ m
22
+ n
23
+ g
24
+ l
25
+ n
26
+ n
27
+ n
28
+ n
29
+ n
30
+ n
31
+ n
32
+ n
33
+ n
34
+ o
35
+ p
36
+ p
37
+ p
38
+ q
39
+ q
40
+ q
41
+ r
42
+ R
43
+ r
44
+ r
45
+ r
46
+ r
47
+ r
48
+ r
49
+ r
50
+ r
51
+ r
52
+ s
53
+ t
54
+ t
55
+ u
56
+ u
57
+ u
58
+ u
59
+ u
60
+ u
61
+ u
62
+ u
63
+ u
64
+ u
65
+ u
66
+ u
67
+ u
68
+ u
69
+ v
70
+ v
71
+ v
72
+ g
73
+ v
74
+ v
75
+ v
76
+ v
77
+ v
78
+ v
79
+ w
80
+ w
81
+ w
82
+ w
83
+ w
84
+ w
85
+ w
86
+ w
87
+ w
88
+ w
89
+ w
90
+ w
91
+ w
92
+ w
93
+ w
94
+ x
95
+ y
96
+ z
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
data/lib/Data/nr.ctx ADDED
Binary file
data/lib/Data/nr.fsa ADDED
Binary file
data/lib/Data/nr.role ADDED
Binary file
@@ -0,0 +1,3 @@
1
+ module Nlpir
2
+ VERSION = "0.0.4"
3
+ end
data/lib/nlpir.rb ADDED
@@ -0,0 +1,275 @@
1
+ # coding: utf-8
2
+ require File.expand_path("../nlpir/version", __FILE__)
3
+ require 'fiddle'
4
+ require 'fiddle/struct'
5
+ require 'fiddle/import'
6
+ require 'fileutils'
7
+ include Fiddle::CParser
8
+ include Fiddle::Importer
9
+
10
+ module Nlpir
11
+ NLPIR_FALSE = 0
12
+ NLPIR_TRUE = 1
13
+ POS_MAP_NUMBER = 4
14
+ ICT_POS_MAP_FIRST = 1 #计算所一级标注集
15
+ ICT_POS_MAP_SECOND = 0 #计算所二级标注集
16
+ PKU_POS_MAP_SECOND = 2 #北大二级标注集
17
+ PKU_POS_MAP_FIRST = 3 #北大一级标注集
18
+ POS_SIZE = 40
19
+
20
+ Result_t = struct ['int start','int length',"char sPOS[#{POS_SIZE}]",'int iPOS',
21
+ 'int word_ID','int word_type','int weight']
22
+
23
+ GBK_CODE = 0 #默认支持GBK编码
24
+ UTF8_CODE = GBK_CODE + 1 #UTF8编码
25
+ BIG5_CODE = GBK_CODE + 2 #BIG5编码
26
+ GBK_FANTI_CODE = GBK_CODE + 3 #GBK编码,里面包含繁体字
27
+
28
+
29
+ #提取链接库接口
30
+ libm = Fiddle.dlopen(File.expand_path("../../bin/NLPIR.dll", __FILE__))
31
+
32
+ NLPIR_Init_rb = Fiddle::Function.new(
33
+ libm['?NLPIR_Init@@YA_NPBDH@Z'],
34
+ [Fiddle::TYPE_VOIDP,Fiddle::TYPE_INT],
35
+ Fiddle::TYPE_INT
36
+ )
37
+ NLPIR_Exit_rb = Fiddle::Function.new(
38
+ libm['?NLPIR_Exit@@YA_NXZ'],
39
+ [],
40
+ Fiddle::TYPE_INT
41
+ )
42
+ NLPIR_ImportUserDict_rb = Fiddle::Function.new(
43
+ libm['?NLPIR_ImportUserDict@@YAIPBD@Z'],
44
+ [Fiddle::TYPE_VOIDP],
45
+ Fiddle::TYPE_INT
46
+ )
47
+ NLPIR_ParagraphProcess_rb = Fiddle::Function.new(
48
+ libm['?NLPIR_ParagraphProcess@@YAPBDPBDH@Z'],
49
+ [Fiddle::TYPE_VOIDP,Fiddle::TYPE_INT],
50
+ Fiddle::TYPE_VOIDP
51
+ )
52
+ NLPIR_ParagraphProcessA_rb = Fiddle::Function.new(
53
+ libm['?NLPIR_ParagraphProcessA@@YAPBUresult_t@@PBDPAH_N@Z'],
54
+ [Fiddle::TYPE_VOIDP,Fiddle::TYPE_VOIDP],
55
+ Fiddle::TYPE_VOIDP
56
+ )
57
+ NLPIR_FileProcess_rb = Fiddle::Function.new(
58
+ libm['?NLPIR_FileProcess@@YANPBD0H@Z'],
59
+ [Fiddle::TYPE_VOIDP,Fiddle::TYPE_VOIDP, Fiddle::TYPE_INT],
60
+ Fiddle::TYPE_DOUBLE
61
+ )
62
+ NLPIR_GetParagraphProcessAWordCount_rb = Fiddle::Function.new(
63
+ libm['?NLPIR_GetParagraphProcessAWordCount@@YAHPBD@Z'],
64
+ [Fiddle::TYPE_VOIDP],
65
+ Fiddle::TYPE_INT
66
+ )
67
+ NLPIR_ParagraphProcessAW_rb = Fiddle::Function.new(
68
+ libm['?NLPIR_ParagraphProcessAW@@YAXHPAUresult_t@@@Z'],
69
+ [Fiddle::TYPE_INT,Fiddle::TYPE_VOIDP],
70
+ Fiddle::TYPE_INT
71
+ )
72
+ NLPIR_AddUserWord_rb = Fiddle::Function.new(
73
+ libm['?NLPIR_AddUserWord@@YAHPBD@Z'],
74
+ [Fiddle::TYPE_VOIDP],
75
+ Fiddle::TYPE_INT
76
+ )
77
+ NLPIR_SaveTheUsrDic_rb = Fiddle::Function.new(
78
+ libm['?NLPIR_SaveTheUsrDic@@YAHXZ'],
79
+ [],
80
+ Fiddle::TYPE_INT
81
+ )
82
+ NLPIR_DelUsrWord_rb = Fiddle::Function.new(
83
+ libm['?NLPIR_DelUsrWord@@YAHPBD@Z'],
84
+ [Fiddle::TYPE_VOIDP],
85
+ Fiddle::TYPE_INT
86
+ )
87
+ NLPIR_GetKeyWords_rb = Fiddle::Function.new(
88
+ libm['?NLPIR_GetKeyWords@@YAPBDPBDH_N@Z'],
89
+ [Fiddle::TYPE_VOIDP,Fiddle::TYPE_INT,Fiddle::TYPE_INT],
90
+ Fiddle::TYPE_VOIDP
91
+ )
92
+ NLPIR_GetFileKeyWords_rb = Fiddle::Function.new(
93
+ libm['?NLPIR_GetFileKeyWords@@YAPBDPBDH_N@Z'],
94
+ [Fiddle::TYPE_VOIDP,Fiddle::TYPE_INT,Fiddle::TYPE_INT],
95
+ Fiddle::TYPE_VOIDP
96
+ )
97
+ NLPIR_GetNewWords_rb = Fiddle::Function.new(
98
+ libm['?NLPIR_GetNewWords@@YAPBDPBDH_N@Z'],
99
+ [Fiddle::TYPE_VOIDP,Fiddle::TYPE_INT,Fiddle::TYPE_INT],
100
+ Fiddle::TYPE_VOIDP
101
+ )
102
+ NLPIR_GetFileNewWords_rb = Fiddle::Function.new(
103
+ libm['?NLPIR_GetFileNewWords@@YAPBDPBDH_N@Z'],
104
+ [Fiddle::TYPE_VOIDP,Fiddle::TYPE_INT,Fiddle::TYPE_INT],
105
+ Fiddle::TYPE_VOIDP
106
+ )
107
+ NLPIR_FingerPrint_rb = Fiddle::Function.new(
108
+ libm['?NLPIR_FingerPrint@@YAKPBD@Z'],
109
+ [Fiddle::TYPE_VOIDP],
110
+ Fiddle::TYPE_LONG
111
+ )
112
+ NLPIR_SetPOSmap_rb = Fiddle::Function.new(
113
+ libm['?NLPIR_SetPOSmap@@YAHH@Z'],
114
+ [Fiddle::TYPE_INT],
115
+ Fiddle::TYPE_INT
116
+ )
117
+
118
+ NLPIR_NWI_Start_rb = Fiddle::Function.new(
119
+ libm['?NLPIR_NWI_Start@@YA_NXZ'],
120
+ [],
121
+ Fiddle::TYPE_INT
122
+ )
123
+ NLPIR_NWI_AddFile_rb = Fiddle::Function.new(
124
+ libm['?NLPIR_NWI_AddFile@@YAHPBD@Z'],
125
+ [Fiddle::TYPE_VOIDP],
126
+ Fiddle::TYPE_INT
127
+ )
128
+ NLPIR_NWI_AddMem_rb = Fiddle::Function.new(
129
+ libm['?NLPIR_NWI_AddMem@@YA_NPBD@Z'],
130
+ [Fiddle::TYPE_VOIDP],
131
+ Fiddle::TYPE_INT
132
+ )
133
+ NLPIR_NWI_Complete_rb = Fiddle::Function.new(
134
+ libm['?NLPIR_NWI_Complete@@YA_NXZ'],
135
+ [],
136
+ Fiddle::TYPE_INT
137
+ )
138
+ NLPIR_NWI_GetResult_rb = Fiddle::Function.new(
139
+ libm['?NLPIR_NWI_GetResult@@YAPBD_N@Z'],
140
+ [Fiddle::TYPE_INT],
141
+ Fiddle::TYPE_VOIDP
142
+ )
143
+ NLPIR_NWI_Result2UserDict_rb = Fiddle::Function.new(
144
+ libm['?NLPIR_NWI_Result2UserDict@@YAIXZ'],
145
+ [],
146
+ Fiddle::TYPE_VOIDP
147
+ )
148
+
149
+ #--函数
150
+
151
+ def NLPIR_Init(sInitDirPath=nil , encoding=UTF8_CODE, filepath)
152
+ filepath += "/Data/"
153
+ if File.exist?(filepath)==false
154
+ FileUtils.mkdir(filepath)
155
+ filemother = File.expand_path("../Data/", __FILE__)
156
+ list=Dir.entries(filemother)
157
+ list.each_index do |x|
158
+ t = filemother+"/"+list[x]
159
+ FileUtils.cp(t,filepath) if !File.directory?(t)
160
+ end
161
+ end
162
+
163
+
164
+ NLPIR_Init_rb.call(sInitDirPath,encoding)
165
+
166
+ end
167
+
168
+ def NLPIR_Exit()
169
+ i = NLPIR_Exit_rb.call()
170
+ return NLPIR_TRUE if i > 0
171
+ end
172
+
173
+ def NLPIR_ImportUserDict(sFilename)
174
+ NLPIR_ImportUserDict_rb.call(sFilename)
175
+ end
176
+
177
+ def NLPIR_ParagraphProcess(sParagraph, bPOStagged=NLPIR_TRUE)
178
+ NLPIR_ParagraphProcess_rb.call(sParagraph, bPOStagged).to_s
179
+ end
180
+
181
+ def NLPIR_ParagraphProcessA(sParagraph)
182
+ resultCount = NLPIR_GetParagraphProcessAWordCount(sParagraph)
183
+ pResultCount = Fiddle::Pointer.to_ptr(resultCount)
184
+ p = NLPIR_ParagraphProcessA_rb.call(sParagraph, pResultCount.ref.to_i)
185
+ pVecResult = Fiddle::Pointer.new(p.to_i)
186
+ words_list = []
187
+ words_list << Result_t.new(pVecResult)
188
+ for i in 1...resultCount do
189
+ words_list << Result_t.new(pVecResult += Result_t.size)
190
+ end
191
+ return words_list
192
+ end
193
+
194
+ def NLPIR_FileProcess(sSourceFilename, sResultFilename, bPOStagged=NLPIR_TRUE)
195
+ NLPIR_FileProcess_rb.call(sSourceFilename, sResultFilename, bPOStagged)
196
+ end
197
+
198
+ def NLPIR_GetParagraphProcessAWordCount(sParagraph)
199
+ NLPIR_GetParagraphProcessAWordCount_rb.call(sParagraph)
200
+ end
201
+
202
+ def NLPIR_ParagraphProcessAW(sParagraph)
203
+ free = Fiddle::Function.new(Fiddle::RUBY_FREE, [TYPE_VOIDP], TYPE_VOID)
204
+ resultCount = NLPIR_GetParagraphProcessAWordCount(sParagraph)
205
+ pVecResult = Pointer.malloc(Result_t.size*resultCount,free)
206
+ NLPIR_ParagraphProcessAW_rb.call(resultCount,pVecResult)
207
+ words_list = []
208
+ words_list << Result_t.new(pVecResult)
209
+ for i in 1...resultCount do
210
+ words_list << Result_t.new(pVecResult+=Result_t.size)
211
+ end
212
+ return words_list
213
+ end
214
+
215
+ def NLPIR_AddUserWord(sWord)
216
+ NLPIR_AddUserWord_rb.call(sWord)
217
+ end
218
+
219
+ def NLPIR_SaveTheUsrDic()
220
+ NLPIR_SaveTheUsrDic_rb.call()
221
+ end
222
+
223
+ def NLPIR_DelUsrWord(sWord)
224
+ NLPIR_DelUsrWord_rb.call(sWord)
225
+ end
226
+
227
+ def NLPIR_GetKeyWords(sLine, nMaxKeyLimit=50, bWeightOut=NLPIR_FALSE)
228
+ NLPIR_GetKeyWords_rb.call(sLine, nMaxKeyLimit, bWeightOut).to_s
229
+ end
230
+
231
+ def NLPIR_GetFileKeyWords(sTextFile, nMaxKeyLimit=50, bWeightOut=NLPIR_FALSE)
232
+ NLPIR_GetFileKeyWords_rb.call(sTextFile, nMaxKeyLimit, bWeightOut).to_s
233
+ end
234
+
235
+ def NLPIR_GetNewWords(sLine, nMaxKeyLimit=50, bWeightOut=NLPIR_FALSE)
236
+ NLPIR_GetNewWords_rb.call(sLine, nMaxKeyLimit, bWeightOut).to_s
237
+ end
238
+
239
+ def NLPIR_GetFileNewWords(sTextFile, nMaxKeyLimit=50, bWeightOut=NLPIR_FALSE)
240
+ NLPIR_GetFileNewWords_rb.call(sTextFile, nMaxKeyLimit, bWeightOut).to_s
241
+ end
242
+
243
+ def NLPIR_FingerPrint(sLine)
244
+ NLPIR_FingerPrint_rb.call(sLine)
245
+ end
246
+
247
+ def NLPIR_SetPOSmap(nPOSmap)
248
+ NLPIR_SetPOSmap_rb.call(nPOSmap)
249
+ end
250
+
251
+ def NLPIR_NWI_Start()
252
+ NLPIR_NWI_Start_rb.call()
253
+ end
254
+
255
+ def NLPIR_NWI_AddFile(sFilename)
256
+ NLPIR_NWI_AddFile_rb.call(sFilename)
257
+ end
258
+
259
+ def NLPIR_NWI_AddMem(sFilename)
260
+ NLPIR_NWI_AddMem_rb.call(sFilename)
261
+ end
262
+
263
+ def NLPIR_NWI_Complete()
264
+ NLPIR_NWI_Complete_rb.call()
265
+ end
266
+
267
+ def NLPIR_NWI_GetResult( bWeightOut = NLPIR_FALSE)
268
+ NLPIR_NWI_GetResult_rb.call(bWeightOut)
269
+ end
270
+
271
+ def NLPIR_NWI_Result2UserDict()
272
+ NLPIR_NWI_Result2UserDict_rb.call()
273
+ end
274
+
275
+ end