1 /* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (http://www.swig.org).
3 * Version 2.0.12
4 *
5 * This file is not intended to be easily readable and contains a number of
6 * coding conventions designed to improve portability and efficiency. Do not make
7 * changes to this file unless you know what you are doing--modify the SWIG
8 * interface file instead.
9 * ----------------------------------------------------------------------------- */
10
11 #define SWIGJAVA
12
13
14 #ifdef __cplusplus
15 /* SwigValueWrapper is described in swig.swg */
16 template<typename T> class SwigValueWrapper {
17 struct SwigMovePointer {
18 T *ptr;
SwigMovePointerSwigValueWrapper::SwigMovePointer19 SwigMovePointer(T *p) : ptr(p) { }
~SwigMovePointerSwigValueWrapper::SwigMovePointer20 ~SwigMovePointer() { delete ptr; }
operator =SwigValueWrapper::SwigMovePointer21 SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
22 } pointer;
23 SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
24 SwigValueWrapper(const SwigValueWrapper<T>& rhs);
25 public:
SwigValueWrapper()26 SwigValueWrapper() : pointer(0) { }
operator =(const T & t)27 SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
operator T&() const28 operator T&() const { return *pointer.ptr; }
operator &()29 T *operator&() { return pointer.ptr; }
30 };
31
SwigValueInit()32 template <typename T> T SwigValueInit() {
33 return T();
34 }
35 #endif
36
37 /* -----------------------------------------------------------------------------
38 * This section contains generic SWIG labels for method/variable
39 * declarations/attributes, and other compiler dependent labels.
40 * ----------------------------------------------------------------------------- */
41
42 /* template workaround for compilers that cannot correctly implement the C++ standard */
43 #ifndef SWIGTEMPLATEDISAMBIGUATOR
44 # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
45 # define SWIGTEMPLATEDISAMBIGUATOR template
46 # elif defined(__HP_aCC)
47 /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
48 /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
49 # define SWIGTEMPLATEDISAMBIGUATOR template
50 # else
51 # define SWIGTEMPLATEDISAMBIGUATOR
52 # endif
53 #endif
54
55 /* inline attribute */
56 #ifndef SWIGINLINE
57 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
58 # define SWIGINLINE inline
59 # else
60 # define SWIGINLINE
61 # endif
62 #endif
63
64 /* attribute recognised by some compilers to avoid 'unused' warnings */
65 #ifndef SWIGUNUSED
66 # if defined(__GNUC__)
67 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
68 # define SWIGUNUSED __attribute__ ((__unused__))
69 # else
70 # define SWIGUNUSED
71 # endif
72 # elif defined(__ICC)
73 # define SWIGUNUSED __attribute__ ((__unused__))
74 # else
75 # define SWIGUNUSED
76 # endif
77 #endif
78
79 #ifndef SWIG_MSC_UNSUPPRESS_4505
80 # if defined(_MSC_VER)
81 # pragma warning(disable : 4505) /* unreferenced local function has been removed */
82 # endif
83 #endif
84
85 #ifndef SWIGUNUSEDPARM
86 # ifdef __cplusplus
87 # define SWIGUNUSEDPARM(p)
88 # else
89 # define SWIGUNUSEDPARM(p) p SWIGUNUSED
90 # endif
91 #endif
92
93 /* internal SWIG method */
94 #ifndef SWIGINTERN
95 # define SWIGINTERN static SWIGUNUSED
96 #endif
97
98 /* internal inline SWIG method */
99 #ifndef SWIGINTERNINLINE
100 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
101 #endif
102
103 /* exporting methods */
104 #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
105 # ifndef GCC_HASCLASSVISIBILITY
106 # define GCC_HASCLASSVISIBILITY
107 # endif
108 #endif
109
110 #ifndef SWIGEXPORT
111 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
112 # if defined(STATIC_LINKED)
113 # define SWIGEXPORT
114 # else
115 # define SWIGEXPORT __declspec(dllexport)
116 # endif
117 # else
118 # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
119 # define SWIGEXPORT __attribute__ ((visibility("default")))
120 # else
121 # define SWIGEXPORT
122 # endif
123 # endif
124 #endif
125
126 /* calling conventions for Windows */
127 #ifndef SWIGSTDCALL
128 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
129 # define SWIGSTDCALL __stdcall
130 # else
131 # define SWIGSTDCALL
132 # endif
133 #endif
134
135 /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
136 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
137 # define _CRT_SECURE_NO_DEPRECATE
138 #endif
139
140 /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
141 #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
142 # define _SCL_SECURE_NO_DEPRECATE
143 #endif
144
145
146
147 /* Fix for jlong on some versions of gcc on Windows */
148 #if defined(__GNUC__) && !defined(__INTEL_COMPILER)
149 typedef long long __int64;
150 #endif
151
152 /* Fix for jlong on 64-bit x86 Solaris */
153 #if defined(__x86_64)
154 # ifdef _LP64
155 # undef _LP64
156 # endif
157 #endif
158
159 #include <jni.h>
160 #include <stdlib.h>
161 #include <string.h>
162
163
164 /* Support for throwing Java exceptions */
165 typedef enum {
166 SWIG_JavaOutOfMemoryError = 1,
167 SWIG_JavaIOException,
168 SWIG_JavaRuntimeException,
169 SWIG_JavaIndexOutOfBoundsException,
170 SWIG_JavaArithmeticException,
171 SWIG_JavaIllegalArgumentException,
172 SWIG_JavaNullPointerException,
173 SWIG_JavaDirectorPureVirtual,
174 SWIG_JavaUnknownError
175 } SWIG_JavaExceptionCodes;
176
177 typedef struct {
178 SWIG_JavaExceptionCodes code;
179 const char *java_exception;
180 } SWIG_JavaExceptions_t;
181
182
SWIG_JavaThrowException(JNIEnv * jenv,SWIG_JavaExceptionCodes code,const char * msg)183 static void SWIGUNUSED SWIG_JavaThrowException(JNIEnv *jenv, SWIG_JavaExceptionCodes code, const char *msg) {
184 jclass excep;
185 static const SWIG_JavaExceptions_t java_exceptions[] = {
186 { SWIG_JavaOutOfMemoryError, "java/lang/OutOfMemoryError" },
187 { SWIG_JavaIOException, "java/io/IOException" },
188 { SWIG_JavaRuntimeException, "java/lang/RuntimeException" },
189 { SWIG_JavaIndexOutOfBoundsException, "java/lang/IndexOutOfBoundsException" },
190 { SWIG_JavaArithmeticException, "java/lang/ArithmeticException" },
191 { SWIG_JavaIllegalArgumentException, "java/lang/IllegalArgumentException" },
192 { SWIG_JavaNullPointerException, "java/lang/NullPointerException" },
193 { SWIG_JavaDirectorPureVirtual, "java/lang/RuntimeException" },
194 { SWIG_JavaUnknownError, "java/lang/UnknownError" },
195 { (SWIG_JavaExceptionCodes)0, "java/lang/UnknownError" }
196 };
197 const SWIG_JavaExceptions_t *except_ptr = java_exceptions;
198
199 while (except_ptr->code != code && except_ptr->code)
200 except_ptr++;
201
202 jenv->ExceptionClear();
203 excep = jenv->FindClass(except_ptr->java_exception);
204 if (excep)
205 jenv->ThrowNew(excep, msg);
206 }
207
208
209 /* Contract support */
210
211 #define SWIG_contract_assert(nullreturn, expr, msg) if (!(expr)) {SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, msg); return nullreturn; } else
212
213 /* Errors in SWIG */
214 #define SWIG_UnknownError -1
215 #define SWIG_IOError -2
216 #define SWIG_RuntimeError -3
217 #define SWIG_IndexError -4
218 #define SWIG_TypeError -5
219 #define SWIG_DivisionByZero -6
220 #define SWIG_OverflowError -7
221 #define SWIG_SyntaxError -8
222 #define SWIG_ValueError -9
223 #define SWIG_SystemError -10
224 #define SWIG_AttributeError -11
225 #define SWIG_MemoryError -12
226 #define SWIG_NullReferenceError -13
227
228
229
230
SWIG_JavaException(JNIEnv * jenv,int code,const char * msg)231 SWIGINTERN void SWIG_JavaException(JNIEnv *jenv, int code, const char *msg) {
232 SWIG_JavaExceptionCodes exception_code = SWIG_JavaUnknownError;
233 switch(code) {
234 case SWIG_MemoryError:
235 exception_code = SWIG_JavaOutOfMemoryError;
236 break;
237 case SWIG_IOError:
238 exception_code = SWIG_JavaIOException;
239 break;
240 case SWIG_SystemError:
241 case SWIG_RuntimeError:
242 exception_code = SWIG_JavaRuntimeException;
243 break;
244 case SWIG_OverflowError:
245 case SWIG_IndexError:
246 exception_code = SWIG_JavaIndexOutOfBoundsException;
247 break;
248 case SWIG_DivisionByZero:
249 exception_code = SWIG_JavaArithmeticException;
250 break;
251 case SWIG_SyntaxError:
252 case SWIG_ValueError:
253 case SWIG_TypeError:
254 exception_code = SWIG_JavaIllegalArgumentException;
255 break;
256 case SWIG_UnknownError:
257 default:
258 exception_code = SWIG_JavaUnknownError;
259 break;
260 }
261 SWIG_JavaThrowException(jenv, exception_code, msg);
262 }
263
264
265 #include <stdexcept>
266
267
268 #include "crfpp.h"
269
270
271
delete_CRFPP_Model(CRFPP::Model * t)272 void delete_CRFPP_Model (CRFPP::Model *t) {
273 delete t;
274 t = 0;
275 }
276
new_CRFPP_Model(const char * arg)277 CRFPP::Model* new_CRFPP_Model(const char *arg) {
278 CRFPP::Model *tagger = CRFPP::createModel(arg);
279 if (!tagger) throw CRFPP::getLastError();
280 return tagger;
281 }
282
delete_CRFPP_Tagger(CRFPP::Tagger * t)283 void delete_CRFPP_Tagger (CRFPP::Tagger *t) {
284 delete t;
285 t = 0;
286 }
287
new_CRFPP_Tagger(const char * arg)288 CRFPP::Tagger* new_CRFPP_Tagger (const char *arg) {
289 CRFPP::Tagger *tagger = CRFPP::createTagger(arg);
290 if (!tagger) throw CRFPP::getLastError();
291 return tagger;
292 }
293
294
295
296 #ifdef __cplusplus
297 extern "C" {
298 #endif
299
Java_org_chasen_crfpp_CRFPPJNI_Model_1getTemplate(JNIEnv * jenv,jclass jcls,jlong jarg1,jobject jarg1_)300 SWIGEXPORT jstring JNICALL Java_org_chasen_crfpp_CRFPPJNI_Model_1getTemplate(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
301 jstring jresult = 0 ;
302 CRFPP::Model *arg1 = (CRFPP::Model *) 0 ;
303 char *result = 0 ;
304
305 (void)jenv;
306 (void)jcls;
307 (void)jarg1_;
308 arg1 = *(CRFPP::Model **)&jarg1;
309 {
310 try {
311 result = (char *)((CRFPP::Model const *)arg1)->getTemplate();
312 }
313 catch (char *e) {
314 {
315 SWIG_JavaException(jenv, SWIG_RuntimeError, e); return 0;
316 };
317 }
318 catch (const char *e) {
319 {
320 SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e); return 0;
321 };
322 }
323 }
324 if (result) jresult = jenv->NewStringUTF((const char *)result);
325 return jresult;
326 }
327
328
Java_org_chasen_crfpp_CRFPPJNI_Model_1createTagger(JNIEnv * jenv,jclass jcls,jlong jarg1,jobject jarg1_)329 SWIGEXPORT jlong JNICALL Java_org_chasen_crfpp_CRFPPJNI_Model_1createTagger(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
330 jlong jresult = 0 ;
331 CRFPP::Model *arg1 = (CRFPP::Model *) 0 ;
332 CRFPP::Tagger *result = 0 ;
333
334 (void)jenv;
335 (void)jcls;
336 (void)jarg1_;
337 arg1 = *(CRFPP::Model **)&jarg1;
338 {
339 try {
340 result = (CRFPP::Tagger *)((CRFPP::Model const *)arg1)->createTagger();
341 }
342 catch (char *e) {
343 {
344 SWIG_JavaException(jenv, SWIG_RuntimeError, e); return 0;
345 };
346 }
347 catch (const char *e) {
348 {
349 SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e); return 0;
350 };
351 }
352 }
353 *(CRFPP::Tagger **)&jresult = result;
354 return jresult;
355 }
356
357
Java_org_chasen_crfpp_CRFPPJNI_Model_1what(JNIEnv * jenv,jclass jcls,jlong jarg1,jobject jarg1_)358 SWIGEXPORT jstring JNICALL Java_org_chasen_crfpp_CRFPPJNI_Model_1what(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
359 jstring jresult = 0 ;
360 CRFPP::Model *arg1 = (CRFPP::Model *) 0 ;
361 char *result = 0 ;
362
363 (void)jenv;
364 (void)jcls;
365 (void)jarg1_;
366 arg1 = *(CRFPP::Model **)&jarg1;
367 {
368 try {
369 result = (char *)(arg1)->what();
370 }
371 catch (char *e) {
372 {
373 SWIG_JavaException(jenv, SWIG_RuntimeError, e); return 0;
374 };
375 }
376 catch (const char *e) {
377 {
378 SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e); return 0;
379 };
380 }
381 }
382 if (result) jresult = jenv->NewStringUTF((const char *)result);
383 return jresult;
384 }
385
386
Java_org_chasen_crfpp_CRFPPJNI_delete_1Model(JNIEnv * jenv,jclass jcls,jlong jarg1)387 SWIGEXPORT void JNICALL Java_org_chasen_crfpp_CRFPPJNI_delete_1Model(JNIEnv *jenv, jclass jcls, jlong jarg1) {
388 CRFPP::Model *arg1 = (CRFPP::Model *) 0 ;
389
390 (void)jenv;
391 (void)jcls;
392 arg1 = *(CRFPP::Model **)&jarg1;
393 {
394 try {
395 delete arg1;
396 }
397 catch (char *e) {
398 {
399 SWIG_JavaException(jenv, SWIG_RuntimeError, e); return ;
400 };
401 }
402 catch (const char *e) {
403 {
404 SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e); return ;
405 };
406 }
407 }
408 }
409
410
Java_org_chasen_crfpp_CRFPPJNI_new_1Model(JNIEnv * jenv,jclass jcls,jstring jarg1)411 SWIGEXPORT jlong JNICALL Java_org_chasen_crfpp_CRFPPJNI_new_1Model(JNIEnv *jenv, jclass jcls, jstring jarg1) {
412 jlong jresult = 0 ;
413 char *arg1 = (char *) 0 ;
414 CRFPP::Model *result = 0 ;
415
416 (void)jenv;
417 (void)jcls;
418 arg1 = 0;
419 if (jarg1) {
420 arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
421 if (!arg1) return 0;
422 }
423 {
424 try {
425 result = (CRFPP::Model *)new_CRFPP_Model((char const *)arg1);
426 }
427 catch (char *e) {
428 {
429 SWIG_JavaException(jenv, SWIG_RuntimeError, e); return 0;
430 };
431 }
432 catch (const char *e) {
433 {
434 SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e); return 0;
435 };
436 }
437 }
438 *(CRFPP::Model **)&jresult = result;
439 if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
440 return jresult;
441 }
442
443
Java_org_chasen_crfpp_CRFPPJNI_Tagger_1set_1model(JNIEnv * jenv,jclass jcls,jlong jarg1,jobject jarg1_,jlong jarg2,jobject jarg2_)444 SWIGEXPORT jboolean JNICALL Java_org_chasen_crfpp_CRFPPJNI_Tagger_1set_1model(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
445 jboolean jresult = 0 ;
446 CRFPP::Tagger *arg1 = (CRFPP::Tagger *) 0 ;
447 CRFPP::Model *arg2 = 0 ;
448 bool result;
449
450 (void)jenv;
451 (void)jcls;
452 (void)jarg1_;
453 (void)jarg2_;
454 arg1 = *(CRFPP::Tagger **)&jarg1;
455 arg2 = *(CRFPP::Model **)&jarg2;
456 if (!arg2) {
457 SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "CRFPP::Model const & reference is null");
458 return 0;
459 }
460 {
461 try {
462 result = (bool)(arg1)->set_model((CRFPP::Model const &)*arg2);
463 }
464 catch (char *e) {
465 {
466 SWIG_JavaException(jenv, SWIG_RuntimeError, e); return 0;
467 };
468 }
469 catch (const char *e) {
470 {
471 SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e); return 0;
472 };
473 }
474 }
475 jresult = (jboolean)result;
476 return jresult;
477 }
478
479
Java_org_chasen_crfpp_CRFPPJNI_Tagger_1set_1vlevel(JNIEnv * jenv,jclass jcls,jlong jarg1,jobject jarg1_,jlong jarg2)480 SWIGEXPORT void JNICALL Java_org_chasen_crfpp_CRFPPJNI_Tagger_1set_1vlevel(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
481 CRFPP::Tagger *arg1 = (CRFPP::Tagger *) 0 ;
482 unsigned int arg2 ;
483
484 (void)jenv;
485 (void)jcls;
486 (void)jarg1_;
487 arg1 = *(CRFPP::Tagger **)&jarg1;
488 arg2 = (unsigned int)jarg2;
489 {
490 try {
491 (arg1)->set_vlevel(arg2);
492 }
493 catch (char *e) {
494 {
495 SWIG_JavaException(jenv, SWIG_RuntimeError, e); return ;
496 };
497 }
498 catch (const char *e) {
499 {
500 SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e); return ;
501 };
502 }
503 }
504 }
505
506
Java_org_chasen_crfpp_CRFPPJNI_Tagger_1vlevel(JNIEnv * jenv,jclass jcls,jlong jarg1,jobject jarg1_)507 SWIGEXPORT jlong JNICALL Java_org_chasen_crfpp_CRFPPJNI_Tagger_1vlevel(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
508 jlong jresult = 0 ;
509 CRFPP::Tagger *arg1 = (CRFPP::Tagger *) 0 ;
510 unsigned int result;
511
512 (void)jenv;
513 (void)jcls;
514 (void)jarg1_;
515 arg1 = *(CRFPP::Tagger **)&jarg1;
516 {
517 try {
518 result = (unsigned int)((CRFPP::Tagger const *)arg1)->vlevel();
519 }
520 catch (char *e) {
521 {
522 SWIG_JavaException(jenv, SWIG_RuntimeError, e); return 0;
523 };
524 }
525 catch (const char *e) {
526 {
527 SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e); return 0;
528 };
529 }
530 }
531 jresult = (jlong)result;
532 return jresult;
533 }
534
535
Java_org_chasen_crfpp_CRFPPJNI_Tagger_1set_1cost_1factor(JNIEnv * jenv,jclass jcls,jlong jarg1,jobject jarg1_,jfloat jarg2)536 SWIGEXPORT void JNICALL Java_org_chasen_crfpp_CRFPPJNI_Tagger_1set_1cost_1factor(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jfloat jarg2) {
537 CRFPP::Tagger *arg1 = (CRFPP::Tagger *) 0 ;
538 float arg2 ;
539
540 (void)jenv;
541 (void)jcls;
542 (void)jarg1_;
543 arg1 = *(CRFPP::Tagger **)&jarg1;
544 arg2 = (float)jarg2;
545 {
546 try {
547 (arg1)->set_cost_factor(arg2);
548 }
549 catch (char *e) {
550 {
551 SWIG_JavaException(jenv, SWIG_RuntimeError, e); return ;
552 };
553 }
554 catch (const char *e) {
555 {
556 SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e); return ;
557 };
558 }
559 }
560 }
561
562
Java_org_chasen_crfpp_CRFPPJNI_Tagger_1cost_1factor(JNIEnv * jenv,jclass jcls,jlong jarg1,jobject jarg1_)563 SWIGEXPORT jfloat JNICALL Java_org_chasen_crfpp_CRFPPJNI_Tagger_1cost_1factor(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
564 jfloat jresult = 0 ;
565 CRFPP::Tagger *arg1 = (CRFPP::Tagger *) 0 ;
566 float result;
567
568 (void)jenv;
569 (void)jcls;
570 (void)jarg1_;
571 arg1 = *(CRFPP::Tagger **)&jarg1;
572 {
573 try {
574 result = (float)((CRFPP::Tagger const *)arg1)->cost_factor();
575 }
576 catch (char *e) {
577 {
578 SWIG_JavaException(jenv, SWIG_RuntimeError, e); return 0;
579 };
580 }
581 catch (const char *e) {
582 {
583 SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e); return 0;
584 };
585 }
586 }
587 jresult = (jfloat)result;
588 return jresult;
589 }
590
591
Java_org_chasen_crfpp_CRFPPJNI_Tagger_1set_1nbest(JNIEnv * jenv,jclass jcls,jlong jarg1,jobject jarg1_,jlong jarg2)592 SWIGEXPORT void JNICALL Java_org_chasen_crfpp_CRFPPJNI_Tagger_1set_1nbest(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
593 CRFPP::Tagger *arg1 = (CRFPP::Tagger *) 0 ;
594 size_t arg2 ;
595
596 (void)jenv;
597 (void)jcls;
598 (void)jarg1_;
599 arg1 = *(CRFPP::Tagger **)&jarg1;
600 arg2 = (size_t)jarg2;
601 {
602 try {
603 (arg1)->set_nbest(arg2);
604 }
605 catch (char *e) {
606 {
607 SWIG_JavaException(jenv, SWIG_RuntimeError, e); return ;
608 };
609 }
610 catch (const char *e) {
611 {
612 SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e); return ;
613 };
614 }
615 }
616 }
617
618
Java_org_chasen_crfpp_CRFPPJNI_Tagger_1nbest(JNIEnv * jenv,jclass jcls,jlong jarg1,jobject jarg1_)619 SWIGEXPORT jlong JNICALL Java_org_chasen_crfpp_CRFPPJNI_Tagger_1nbest(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
620 jlong jresult = 0 ;
621 CRFPP::Tagger *arg1 = (CRFPP::Tagger *) 0 ;
622 size_t result;
623
624 (void)jenv;
625 (void)jcls;
626 (void)jarg1_;
627 arg1 = *(CRFPP::Tagger **)&jarg1;
628 {
629 try {
630 result = ((CRFPP::Tagger const *)arg1)->nbest();
631 }
632 catch (char *e) {
633 {
634 SWIG_JavaException(jenv, SWIG_RuntimeError, e); return 0;
635 };
636 }
637 catch (const char *e) {
638 {
639 SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e); return 0;
640 };
641 }
642 }
643 jresult = (jlong)result;
644 return jresult;
645 }
646
647
Java_org_chasen_crfpp_CRFPPJNI_Tagger_1add(JNIEnv * jenv,jclass jcls,jlong jarg1,jobject jarg1_,jstring jarg2)648 SWIGEXPORT jboolean JNICALL Java_org_chasen_crfpp_CRFPPJNI_Tagger_1add(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
649 jboolean jresult = 0 ;
650 CRFPP::Tagger *arg1 = (CRFPP::Tagger *) 0 ;
651 char *arg2 = (char *) 0 ;
652 bool result;
653
654 (void)jenv;
655 (void)jcls;
656 (void)jarg1_;
657 arg1 = *(CRFPP::Tagger **)&jarg1;
658 arg2 = 0;
659 if (jarg2) {
660 arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
661 if (!arg2) return 0;
662 }
663 {
664 try {
665 result = (bool)(arg1)->add((char const *)arg2);
666 }
667 catch (char *e) {
668 {
669 SWIG_JavaException(jenv, SWIG_RuntimeError, e); return 0;
670 };
671 }
672 catch (const char *e) {
673 {
674 SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e); return 0;
675 };
676 }
677 }
678 jresult = (jboolean)result;
679 if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
680 return jresult;
681 }
682
683
Java_org_chasen_crfpp_CRFPPJNI_Tagger_1size(JNIEnv * jenv,jclass jcls,jlong jarg1,jobject jarg1_)684 SWIGEXPORT jlong JNICALL Java_org_chasen_crfpp_CRFPPJNI_Tagger_1size(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
685 jlong jresult = 0 ;
686 CRFPP::Tagger *arg1 = (CRFPP::Tagger *) 0 ;
687 size_t result;
688
689 (void)jenv;
690 (void)jcls;
691 (void)jarg1_;
692 arg1 = *(CRFPP::Tagger **)&jarg1;
693 {
694 try {
695 result = ((CRFPP::Tagger const *)arg1)->size();
696 }
697 catch (char *e) {
698 {
699 SWIG_JavaException(jenv, SWIG_RuntimeError, e); return 0;
700 };
701 }
702 catch (const char *e) {
703 {
704 SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e); return 0;
705 };
706 }
707 }
708 jresult = (jlong)result;
709 return jresult;
710 }
711
712
Java_org_chasen_crfpp_CRFPPJNI_Tagger_1xsize(JNIEnv * jenv,jclass jcls,jlong jarg1,jobject jarg1_)713 SWIGEXPORT jlong JNICALL Java_org_chasen_crfpp_CRFPPJNI_Tagger_1xsize(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
714 jlong jresult = 0 ;
715 CRFPP::Tagger *arg1 = (CRFPP::Tagger *) 0 ;
716 size_t result;
717
718 (void)jenv;
719 (void)jcls;
720 (void)jarg1_;
721 arg1 = *(CRFPP::Tagger **)&jarg1;
722 {
723 try {
724 result = ((CRFPP::Tagger const *)arg1)->xsize();
725 }
726 catch (char *e) {
727 {
728 SWIG_JavaException(jenv, SWIG_RuntimeError, e); return 0;
729 };
730 }
731 catch (const char *e) {
732 {
733 SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e); return 0;
734 };
735 }
736 }
737 jresult = (jlong)result;
738 return jresult;
739 }
740
741
Java_org_chasen_crfpp_CRFPPJNI_Tagger_1dsize(JNIEnv * jenv,jclass jcls,jlong jarg1,jobject jarg1_)742 SWIGEXPORT jlong JNICALL Java_org_chasen_crfpp_CRFPPJNI_Tagger_1dsize(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
743 jlong jresult = 0 ;
744 CRFPP::Tagger *arg1 = (CRFPP::Tagger *) 0 ;
745 size_t result;
746
747 (void)jenv;
748 (void)jcls;
749 (void)jarg1_;
750 arg1 = *(CRFPP::Tagger **)&jarg1;
751 {
752 try {
753 result = ((CRFPP::Tagger const *)arg1)->dsize();
754 }
755 catch (char *e) {
756 {
757 SWIG_JavaException(jenv, SWIG_RuntimeError, e); return 0;
758 };
759 }
760 catch (const char *e) {
761 {
762 SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e); return 0;
763 };
764 }
765 }
766 jresult = (jlong)result;
767 return jresult;
768 }
769
770
Java_org_chasen_crfpp_CRFPPJNI_Tagger_1result(JNIEnv * jenv,jclass jcls,jlong jarg1,jobject jarg1_,jlong jarg2)771 SWIGEXPORT jlong JNICALL Java_org_chasen_crfpp_CRFPPJNI_Tagger_1result(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
772 jlong jresult = 0 ;
773 CRFPP::Tagger *arg1 = (CRFPP::Tagger *) 0 ;
774 size_t arg2 ;
775 size_t result;
776
777 (void)jenv;
778 (void)jcls;
779 (void)jarg1_;
780 arg1 = *(CRFPP::Tagger **)&jarg1;
781 arg2 = (size_t)jarg2;
782 {
783 try {
784 result = ((CRFPP::Tagger const *)arg1)->result(arg2);
785 }
786 catch (char *e) {
787 {
788 SWIG_JavaException(jenv, SWIG_RuntimeError, e); return 0;
789 };
790 }
791 catch (const char *e) {
792 {
793 SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e); return 0;
794 };
795 }
796 }
797 jresult = (jlong)result;
798 return jresult;
799 }
800
801
Java_org_chasen_crfpp_CRFPPJNI_Tagger_1answer(JNIEnv * jenv,jclass jcls,jlong jarg1,jobject jarg1_,jlong jarg2)802 SWIGEXPORT jlong JNICALL Java_org_chasen_crfpp_CRFPPJNI_Tagger_1answer(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
803 jlong jresult = 0 ;
804 CRFPP::Tagger *arg1 = (CRFPP::Tagger *) 0 ;
805 size_t arg2 ;
806 size_t result;
807
808 (void)jenv;
809 (void)jcls;
810 (void)jarg1_;
811 arg1 = *(CRFPP::Tagger **)&jarg1;
812 arg2 = (size_t)jarg2;
813 {
814 try {
815 result = ((CRFPP::Tagger const *)arg1)->answer(arg2);
816 }
817 catch (char *e) {
818 {
819 SWIG_JavaException(jenv, SWIG_RuntimeError, e); return 0;
820 };
821 }
822 catch (const char *e) {
823 {
824 SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e); return 0;
825 };
826 }
827 }
828 jresult = (jlong)result;
829 return jresult;
830 }
831
832
Java_org_chasen_crfpp_CRFPPJNI_Tagger_1y(JNIEnv * jenv,jclass jcls,jlong jarg1,jobject jarg1_,jlong jarg2)833 SWIGEXPORT jlong JNICALL Java_org_chasen_crfpp_CRFPPJNI_Tagger_1y(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
834 jlong jresult = 0 ;
835 CRFPP::Tagger *arg1 = (CRFPP::Tagger *) 0 ;
836 size_t arg2 ;
837 size_t result;
838
839 (void)jenv;
840 (void)jcls;
841 (void)jarg1_;
842 arg1 = *(CRFPP::Tagger **)&jarg1;
843 arg2 = (size_t)jarg2;
844 {
845 try {
846 result = ((CRFPP::Tagger const *)arg1)->y(arg2);
847 }
848 catch (char *e) {
849 {
850 SWIG_JavaException(jenv, SWIG_RuntimeError, e); return 0;
851 };
852 }
853 catch (const char *e) {
854 {
855 SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e); return 0;
856 };
857 }
858 }
859 jresult = (jlong)result;
860 return jresult;
861 }
862
863
Java_org_chasen_crfpp_CRFPPJNI_Tagger_1y2(JNIEnv * jenv,jclass jcls,jlong jarg1,jobject jarg1_,jlong jarg2)864 SWIGEXPORT jstring JNICALL Java_org_chasen_crfpp_CRFPPJNI_Tagger_1y2(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
865 jstring jresult = 0 ;
866 CRFPP::Tagger *arg1 = (CRFPP::Tagger *) 0 ;
867 size_t arg2 ;
868 char *result = 0 ;
869
870 (void)jenv;
871 (void)jcls;
872 (void)jarg1_;
873 arg1 = *(CRFPP::Tagger **)&jarg1;
874 arg2 = (size_t)jarg2;
875 {
876 try {
877 result = (char *)((CRFPP::Tagger const *)arg1)->y2(arg2);
878 }
879 catch (char *e) {
880 {
881 SWIG_JavaException(jenv, SWIG_RuntimeError, e); return 0;
882 };
883 }
884 catch (const char *e) {
885 {
886 SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e); return 0;
887 };
888 }
889 }
890 if (result) jresult = jenv->NewStringUTF((const char *)result);
891 return jresult;
892 }
893
894
Java_org_chasen_crfpp_CRFPPJNI_Tagger_1yname(JNIEnv * jenv,jclass jcls,jlong jarg1,jobject jarg1_,jlong jarg2)895 SWIGEXPORT jstring JNICALL Java_org_chasen_crfpp_CRFPPJNI_Tagger_1yname(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
896 jstring jresult = 0 ;
897 CRFPP::Tagger *arg1 = (CRFPP::Tagger *) 0 ;
898 size_t arg2 ;
899 char *result = 0 ;
900
901 (void)jenv;
902 (void)jcls;
903 (void)jarg1_;
904 arg1 = *(CRFPP::Tagger **)&jarg1;
905 arg2 = (size_t)jarg2;
906 {
907 try {
908 result = (char *)((CRFPP::Tagger const *)arg1)->yname(arg2);
909 }
910 catch (char *e) {
911 {
912 SWIG_JavaException(jenv, SWIG_RuntimeError, e); return 0;
913 };
914 }
915 catch (const char *e) {
916 {
917 SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e); return 0;
918 };
919 }
920 }
921 if (result) jresult = jenv->NewStringUTF((const char *)result);
922 return jresult;
923 }
924
925
Java_org_chasen_crfpp_CRFPPJNI_Tagger_1x(JNIEnv * jenv,jclass jcls,jlong jarg1,jobject jarg1_,jlong jarg2,jlong jarg3)926 SWIGEXPORT jstring JNICALL Java_org_chasen_crfpp_CRFPPJNI_Tagger_1x(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jlong jarg3) {
927 jstring jresult = 0 ;
928 CRFPP::Tagger *arg1 = (CRFPP::Tagger *) 0 ;
929 size_t arg2 ;
930 size_t arg3 ;
931 char *result = 0 ;
932
933 (void)jenv;
934 (void)jcls;
935 (void)jarg1_;
936 arg1 = *(CRFPP::Tagger **)&jarg1;
937 arg2 = (size_t)jarg2;
938 arg3 = (size_t)jarg3;
939 {
940 try {
941 result = (char *)((CRFPP::Tagger const *)arg1)->x(arg2,arg3);
942 }
943 catch (char *e) {
944 {
945 SWIG_JavaException(jenv, SWIG_RuntimeError, e); return 0;
946 };
947 }
948 catch (const char *e) {
949 {
950 SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e); return 0;
951 };
952 }
953 }
954 if (result) jresult = jenv->NewStringUTF((const char *)result);
955 return jresult;
956 }
957
958
Java_org_chasen_crfpp_CRFPPJNI_Tagger_1ysize(JNIEnv * jenv,jclass jcls,jlong jarg1,jobject jarg1_)959 SWIGEXPORT jlong JNICALL Java_org_chasen_crfpp_CRFPPJNI_Tagger_1ysize(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
960 jlong jresult = 0 ;
961 CRFPP::Tagger *arg1 = (CRFPP::Tagger *) 0 ;
962 size_t result;
963
964 (void)jenv;
965 (void)jcls;
966 (void)jarg1_;
967 arg1 = *(CRFPP::Tagger **)&jarg1;
968 {
969 try {
970 result = ((CRFPP::Tagger const *)arg1)->ysize();
971 }
972 catch (char *e) {
973 {
974 SWIG_JavaException(jenv, SWIG_RuntimeError, e); return 0;
975 };
976 }
977 catch (const char *e) {
978 {
979 SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e); return 0;
980 };
981 }
982 }
983 jresult = (jlong)result;
984 return jresult;
985 }
986
987
Java_org_chasen_crfpp_CRFPPJNI_Tagger_1prob_1_1SWIG_10(JNIEnv * jenv,jclass jcls,jlong jarg1,jobject jarg1_,jlong jarg2,jlong jarg3)988 SWIGEXPORT jdouble JNICALL Java_org_chasen_crfpp_CRFPPJNI_Tagger_1prob_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jlong jarg3) {
989 jdouble jresult = 0 ;
990 CRFPP::Tagger *arg1 = (CRFPP::Tagger *) 0 ;
991 size_t arg2 ;
992 size_t arg3 ;
993 double result;
994
995 (void)jenv;
996 (void)jcls;
997 (void)jarg1_;
998 arg1 = *(CRFPP::Tagger **)&jarg1;
999 arg2 = (size_t)jarg2;
1000 arg3 = (size_t)jarg3;
1001 {
1002 try {
1003 result = (double)((CRFPP::Tagger const *)arg1)->prob(arg2,arg3);
1004 }
1005 catch (char *e) {
1006 {
1007 SWIG_JavaException(jenv, SWIG_RuntimeError, e); return 0;
1008 };
1009 }
1010 catch (const char *e) {
1011 {
1012 SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e); return 0;
1013 };
1014 }
1015 }
1016 jresult = (jdouble)result;
1017 return jresult;
1018 }
1019
1020
Java_org_chasen_crfpp_CRFPPJNI_Tagger_1prob_1_1SWIG_11(JNIEnv * jenv,jclass jcls,jlong jarg1,jobject jarg1_,jlong jarg2)1021 SWIGEXPORT jdouble JNICALL Java_org_chasen_crfpp_CRFPPJNI_Tagger_1prob_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
1022 jdouble jresult = 0 ;
1023 CRFPP::Tagger *arg1 = (CRFPP::Tagger *) 0 ;
1024 size_t arg2 ;
1025 double result;
1026
1027 (void)jenv;
1028 (void)jcls;
1029 (void)jarg1_;
1030 arg1 = *(CRFPP::Tagger **)&jarg1;
1031 arg2 = (size_t)jarg2;
1032 {
1033 try {
1034 result = (double)((CRFPP::Tagger const *)arg1)->prob(arg2);
1035 }
1036 catch (char *e) {
1037 {
1038 SWIG_JavaException(jenv, SWIG_RuntimeError, e); return 0;
1039 };
1040 }
1041 catch (const char *e) {
1042 {
1043 SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e); return 0;
1044 };
1045 }
1046 }
1047 jresult = (jdouble)result;
1048 return jresult;
1049 }
1050
1051
Java_org_chasen_crfpp_CRFPPJNI_Tagger_1prob_1_1SWIG_12(JNIEnv * jenv,jclass jcls,jlong jarg1,jobject jarg1_)1052 SWIGEXPORT jdouble JNICALL Java_org_chasen_crfpp_CRFPPJNI_Tagger_1prob_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1053 jdouble jresult = 0 ;
1054 CRFPP::Tagger *arg1 = (CRFPP::Tagger *) 0 ;
1055 double result;
1056
1057 (void)jenv;
1058 (void)jcls;
1059 (void)jarg1_;
1060 arg1 = *(CRFPP::Tagger **)&jarg1;
1061 {
1062 try {
1063 result = (double)((CRFPP::Tagger const *)arg1)->prob();
1064 }
1065 catch (char *e) {
1066 {
1067 SWIG_JavaException(jenv, SWIG_RuntimeError, e); return 0;
1068 };
1069 }
1070 catch (const char *e) {
1071 {
1072 SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e); return 0;
1073 };
1074 }
1075 }
1076 jresult = (jdouble)result;
1077 return jresult;
1078 }
1079
1080
Java_org_chasen_crfpp_CRFPPJNI_Tagger_1set_1penalty(JNIEnv * jenv,jclass jcls,jlong jarg1,jobject jarg1_,jlong jarg2,jlong jarg3,jdouble jarg4)1081 SWIGEXPORT void JNICALL Java_org_chasen_crfpp_CRFPPJNI_Tagger_1set_1penalty(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jlong jarg3, jdouble jarg4) {
1082 CRFPP::Tagger *arg1 = (CRFPP::Tagger *) 0 ;
1083 size_t arg2 ;
1084 size_t arg3 ;
1085 double arg4 ;
1086
1087 (void)jenv;
1088 (void)jcls;
1089 (void)jarg1_;
1090 arg1 = *(CRFPP::Tagger **)&jarg1;
1091 arg2 = (size_t)jarg2;
1092 arg3 = (size_t)jarg3;
1093 arg4 = (double)jarg4;
1094 {
1095 try {
1096 (arg1)->set_penalty(arg2,arg3,arg4);
1097 }
1098 catch (char *e) {
1099 {
1100 SWIG_JavaException(jenv, SWIG_RuntimeError, e); return ;
1101 };
1102 }
1103 catch (const char *e) {
1104 {
1105 SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e); return ;
1106 };
1107 }
1108 }
1109 }
1110
1111
Java_org_chasen_crfpp_CRFPPJNI_Tagger_1penalty(JNIEnv * jenv,jclass jcls,jlong jarg1,jobject jarg1_,jlong jarg2,jlong jarg3)1112 SWIGEXPORT jdouble JNICALL Java_org_chasen_crfpp_CRFPPJNI_Tagger_1penalty(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jlong jarg3) {
1113 jdouble jresult = 0 ;
1114 CRFPP::Tagger *arg1 = (CRFPP::Tagger *) 0 ;
1115 size_t arg2 ;
1116 size_t arg3 ;
1117 double result;
1118
1119 (void)jenv;
1120 (void)jcls;
1121 (void)jarg1_;
1122 arg1 = *(CRFPP::Tagger **)&jarg1;
1123 arg2 = (size_t)jarg2;
1124 arg3 = (size_t)jarg3;
1125 {
1126 try {
1127 result = (double)((CRFPP::Tagger const *)arg1)->penalty(arg2,arg3);
1128 }
1129 catch (char *e) {
1130 {
1131 SWIG_JavaException(jenv, SWIG_RuntimeError, e); return 0;
1132 };
1133 }
1134 catch (const char *e) {
1135 {
1136 SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e); return 0;
1137 };
1138 }
1139 }
1140 jresult = (jdouble)result;
1141 return jresult;
1142 }
1143
1144
Java_org_chasen_crfpp_CRFPPJNI_Tagger_1alpha(JNIEnv * jenv,jclass jcls,jlong jarg1,jobject jarg1_,jlong jarg2,jlong jarg3)1145 SWIGEXPORT jdouble JNICALL Java_org_chasen_crfpp_CRFPPJNI_Tagger_1alpha(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jlong jarg3) {
1146 jdouble jresult = 0 ;
1147 CRFPP::Tagger *arg1 = (CRFPP::Tagger *) 0 ;
1148 size_t arg2 ;
1149 size_t arg3 ;
1150 double result;
1151
1152 (void)jenv;
1153 (void)jcls;
1154 (void)jarg1_;
1155 arg1 = *(CRFPP::Tagger **)&jarg1;
1156 arg2 = (size_t)jarg2;
1157 arg3 = (size_t)jarg3;
1158 {
1159 try {
1160 result = (double)((CRFPP::Tagger const *)arg1)->alpha(arg2,arg3);
1161 }
1162 catch (char *e) {
1163 {
1164 SWIG_JavaException(jenv, SWIG_RuntimeError, e); return 0;
1165 };
1166 }
1167 catch (const char *e) {
1168 {
1169 SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e); return 0;
1170 };
1171 }
1172 }
1173 jresult = (jdouble)result;
1174 return jresult;
1175 }
1176
1177
Java_org_chasen_crfpp_CRFPPJNI_Tagger_1beta(JNIEnv * jenv,jclass jcls,jlong jarg1,jobject jarg1_,jlong jarg2,jlong jarg3)1178 SWIGEXPORT jdouble JNICALL Java_org_chasen_crfpp_CRFPPJNI_Tagger_1beta(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jlong jarg3) {
1179 jdouble jresult = 0 ;
1180 CRFPP::Tagger *arg1 = (CRFPP::Tagger *) 0 ;
1181 size_t arg2 ;
1182 size_t arg3 ;
1183 double result;
1184
1185 (void)jenv;
1186 (void)jcls;
1187 (void)jarg1_;
1188 arg1 = *(CRFPP::Tagger **)&jarg1;
1189 arg2 = (size_t)jarg2;
1190 arg3 = (size_t)jarg3;
1191 {
1192 try {
1193 result = (double)((CRFPP::Tagger const *)arg1)->beta(arg2,arg3);
1194 }
1195 catch (char *e) {
1196 {
1197 SWIG_JavaException(jenv, SWIG_RuntimeError, e); return 0;
1198 };
1199 }
1200 catch (const char *e) {
1201 {
1202 SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e); return 0;
1203 };
1204 }
1205 }
1206 jresult = (jdouble)result;
1207 return jresult;
1208 }
1209
1210
Java_org_chasen_crfpp_CRFPPJNI_Tagger_1emission_1cost(JNIEnv * jenv,jclass jcls,jlong jarg1,jobject jarg1_,jlong jarg2,jlong jarg3)1211 SWIGEXPORT jdouble JNICALL Java_org_chasen_crfpp_CRFPPJNI_Tagger_1emission_1cost(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jlong jarg3) {
1212 jdouble jresult = 0 ;
1213 CRFPP::Tagger *arg1 = (CRFPP::Tagger *) 0 ;
1214 size_t arg2 ;
1215 size_t arg3 ;
1216 double result;
1217
1218 (void)jenv;
1219 (void)jcls;
1220 (void)jarg1_;
1221 arg1 = *(CRFPP::Tagger **)&jarg1;
1222 arg2 = (size_t)jarg2;
1223 arg3 = (size_t)jarg3;
1224 {
1225 try {
1226 result = (double)((CRFPP::Tagger const *)arg1)->emission_cost(arg2,arg3);
1227 }
1228 catch (char *e) {
1229 {
1230 SWIG_JavaException(jenv, SWIG_RuntimeError, e); return 0;
1231 };
1232 }
1233 catch (const char *e) {
1234 {
1235 SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e); return 0;
1236 };
1237 }
1238 }
1239 jresult = (jdouble)result;
1240 return jresult;
1241 }
1242
1243
Java_org_chasen_crfpp_CRFPPJNI_Tagger_1next_1transition_1cost(JNIEnv * jenv,jclass jcls,jlong jarg1,jobject jarg1_,jlong jarg2,jlong jarg3,jlong jarg4)1244 SWIGEXPORT jdouble JNICALL Java_org_chasen_crfpp_CRFPPJNI_Tagger_1next_1transition_1cost(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jlong jarg3, jlong jarg4) {
1245 jdouble jresult = 0 ;
1246 CRFPP::Tagger *arg1 = (CRFPP::Tagger *) 0 ;
1247 size_t arg2 ;
1248 size_t arg3 ;
1249 size_t arg4 ;
1250 double result;
1251
1252 (void)jenv;
1253 (void)jcls;
1254 (void)jarg1_;
1255 arg1 = *(CRFPP::Tagger **)&jarg1;
1256 arg2 = (size_t)jarg2;
1257 arg3 = (size_t)jarg3;
1258 arg4 = (size_t)jarg4;
1259 {
1260 try {
1261 result = (double)((CRFPP::Tagger const *)arg1)->next_transition_cost(arg2,arg3,arg4);
1262 }
1263 catch (char *e) {
1264 {
1265 SWIG_JavaException(jenv, SWIG_RuntimeError, e); return 0;
1266 };
1267 }
1268 catch (const char *e) {
1269 {
1270 SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e); return 0;
1271 };
1272 }
1273 }
1274 jresult = (jdouble)result;
1275 return jresult;
1276 }
1277
1278
Java_org_chasen_crfpp_CRFPPJNI_Tagger_1prev_1transition_1cost(JNIEnv * jenv,jclass jcls,jlong jarg1,jobject jarg1_,jlong jarg2,jlong jarg3,jlong jarg4)1279 SWIGEXPORT jdouble JNICALL Java_org_chasen_crfpp_CRFPPJNI_Tagger_1prev_1transition_1cost(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jlong jarg3, jlong jarg4) {
1280 jdouble jresult = 0 ;
1281 CRFPP::Tagger *arg1 = (CRFPP::Tagger *) 0 ;
1282 size_t arg2 ;
1283 size_t arg3 ;
1284 size_t arg4 ;
1285 double result;
1286
1287 (void)jenv;
1288 (void)jcls;
1289 (void)jarg1_;
1290 arg1 = *(CRFPP::Tagger **)&jarg1;
1291 arg2 = (size_t)jarg2;
1292 arg3 = (size_t)jarg3;
1293 arg4 = (size_t)jarg4;
1294 {
1295 try {
1296 result = (double)((CRFPP::Tagger const *)arg1)->prev_transition_cost(arg2,arg3,arg4);
1297 }
1298 catch (char *e) {
1299 {
1300 SWIG_JavaException(jenv, SWIG_RuntimeError, e); return 0;
1301 };
1302 }
1303 catch (const char *e) {
1304 {
1305 SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e); return 0;
1306 };
1307 }
1308 }
1309 jresult = (jdouble)result;
1310 return jresult;
1311 }
1312
1313
Java_org_chasen_crfpp_CRFPPJNI_Tagger_1best_1cost(JNIEnv * jenv,jclass jcls,jlong jarg1,jobject jarg1_,jlong jarg2,jlong jarg3)1314 SWIGEXPORT jdouble JNICALL Java_org_chasen_crfpp_CRFPPJNI_Tagger_1best_1cost(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jlong jarg3) {
1315 jdouble jresult = 0 ;
1316 CRFPP::Tagger *arg1 = (CRFPP::Tagger *) 0 ;
1317 size_t arg2 ;
1318 size_t arg3 ;
1319 double result;
1320
1321 (void)jenv;
1322 (void)jcls;
1323 (void)jarg1_;
1324 arg1 = *(CRFPP::Tagger **)&jarg1;
1325 arg2 = (size_t)jarg2;
1326 arg3 = (size_t)jarg3;
1327 {
1328 try {
1329 result = (double)((CRFPP::Tagger const *)arg1)->best_cost(arg2,arg3);
1330 }
1331 catch (char *e) {
1332 {
1333 SWIG_JavaException(jenv, SWIG_RuntimeError, e); return 0;
1334 };
1335 }
1336 catch (const char *e) {
1337 {
1338 SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e); return 0;
1339 };
1340 }
1341 }
1342 jresult = (jdouble)result;
1343 return jresult;
1344 }
1345
1346
Java_org_chasen_crfpp_CRFPPJNI_Tagger_1Z(JNIEnv * jenv,jclass jcls,jlong jarg1,jobject jarg1_)1347 SWIGEXPORT jdouble JNICALL Java_org_chasen_crfpp_CRFPPJNI_Tagger_1Z(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1348 jdouble jresult = 0 ;
1349 CRFPP::Tagger *arg1 = (CRFPP::Tagger *) 0 ;
1350 double result;
1351
1352 (void)jenv;
1353 (void)jcls;
1354 (void)jarg1_;
1355 arg1 = *(CRFPP::Tagger **)&jarg1;
1356 {
1357 try {
1358 result = (double)((CRFPP::Tagger const *)arg1)->Z();
1359 }
1360 catch (char *e) {
1361 {
1362 SWIG_JavaException(jenv, SWIG_RuntimeError, e); return 0;
1363 };
1364 }
1365 catch (const char *e) {
1366 {
1367 SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e); return 0;
1368 };
1369 }
1370 }
1371 jresult = (jdouble)result;
1372 return jresult;
1373 }
1374
1375
Java_org_chasen_crfpp_CRFPPJNI_Tagger_1parse_1_1SWIG_10(JNIEnv * jenv,jclass jcls,jlong jarg1,jobject jarg1_)1376 SWIGEXPORT jboolean JNICALL Java_org_chasen_crfpp_CRFPPJNI_Tagger_1parse_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1377 jboolean jresult = 0 ;
1378 CRFPP::Tagger *arg1 = (CRFPP::Tagger *) 0 ;
1379 bool result;
1380
1381 (void)jenv;
1382 (void)jcls;
1383 (void)jarg1_;
1384 arg1 = *(CRFPP::Tagger **)&jarg1;
1385 {
1386 try {
1387 result = (bool)(arg1)->parse();
1388 }
1389 catch (char *e) {
1390 {
1391 SWIG_JavaException(jenv, SWIG_RuntimeError, e); return 0;
1392 };
1393 }
1394 catch (const char *e) {
1395 {
1396 SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e); return 0;
1397 };
1398 }
1399 }
1400 jresult = (jboolean)result;
1401 return jresult;
1402 }
1403
1404
Java_org_chasen_crfpp_CRFPPJNI_Tagger_1empty(JNIEnv * jenv,jclass jcls,jlong jarg1,jobject jarg1_)1405 SWIGEXPORT jboolean JNICALL Java_org_chasen_crfpp_CRFPPJNI_Tagger_1empty(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1406 jboolean jresult = 0 ;
1407 CRFPP::Tagger *arg1 = (CRFPP::Tagger *) 0 ;
1408 bool result;
1409
1410 (void)jenv;
1411 (void)jcls;
1412 (void)jarg1_;
1413 arg1 = *(CRFPP::Tagger **)&jarg1;
1414 {
1415 try {
1416 result = (bool)((CRFPP::Tagger const *)arg1)->empty();
1417 }
1418 catch (char *e) {
1419 {
1420 SWIG_JavaException(jenv, SWIG_RuntimeError, e); return 0;
1421 };
1422 }
1423 catch (const char *e) {
1424 {
1425 SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e); return 0;
1426 };
1427 }
1428 }
1429 jresult = (jboolean)result;
1430 return jresult;
1431 }
1432
1433
Java_org_chasen_crfpp_CRFPPJNI_Tagger_1clear(JNIEnv * jenv,jclass jcls,jlong jarg1,jobject jarg1_)1434 SWIGEXPORT jboolean JNICALL Java_org_chasen_crfpp_CRFPPJNI_Tagger_1clear(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1435 jboolean jresult = 0 ;
1436 CRFPP::Tagger *arg1 = (CRFPP::Tagger *) 0 ;
1437 bool result;
1438
1439 (void)jenv;
1440 (void)jcls;
1441 (void)jarg1_;
1442 arg1 = *(CRFPP::Tagger **)&jarg1;
1443 {
1444 try {
1445 result = (bool)(arg1)->clear();
1446 }
1447 catch (char *e) {
1448 {
1449 SWIG_JavaException(jenv, SWIG_RuntimeError, e); return 0;
1450 };
1451 }
1452 catch (const char *e) {
1453 {
1454 SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e); return 0;
1455 };
1456 }
1457 }
1458 jresult = (jboolean)result;
1459 return jresult;
1460 }
1461
1462
Java_org_chasen_crfpp_CRFPPJNI_Tagger_1next(JNIEnv * jenv,jclass jcls,jlong jarg1,jobject jarg1_)1463 SWIGEXPORT jboolean JNICALL Java_org_chasen_crfpp_CRFPPJNI_Tagger_1next(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1464 jboolean jresult = 0 ;
1465 CRFPP::Tagger *arg1 = (CRFPP::Tagger *) 0 ;
1466 bool result;
1467
1468 (void)jenv;
1469 (void)jcls;
1470 (void)jarg1_;
1471 arg1 = *(CRFPP::Tagger **)&jarg1;
1472 {
1473 try {
1474 result = (bool)(arg1)->next();
1475 }
1476 catch (char *e) {
1477 {
1478 SWIG_JavaException(jenv, SWIG_RuntimeError, e); return 0;
1479 };
1480 }
1481 catch (const char *e) {
1482 {
1483 SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e); return 0;
1484 };
1485 }
1486 }
1487 jresult = (jboolean)result;
1488 return jresult;
1489 }
1490
1491
Java_org_chasen_crfpp_CRFPPJNI_Tagger_1parse_1_1SWIG_11(JNIEnv * jenv,jclass jcls,jlong jarg1,jobject jarg1_,jstring jarg2)1492 SWIGEXPORT jstring JNICALL Java_org_chasen_crfpp_CRFPPJNI_Tagger_1parse_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
1493 jstring jresult = 0 ;
1494 CRFPP::Tagger *arg1 = (CRFPP::Tagger *) 0 ;
1495 char *arg2 = (char *) 0 ;
1496 char *result = 0 ;
1497
1498 (void)jenv;
1499 (void)jcls;
1500 (void)jarg1_;
1501 arg1 = *(CRFPP::Tagger **)&jarg1;
1502 arg2 = 0;
1503 if (jarg2) {
1504 arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
1505 if (!arg2) return 0;
1506 }
1507 {
1508 try {
1509 result = (char *)(arg1)->parse((char const *)arg2);
1510 }
1511 catch (char *e) {
1512 {
1513 SWIG_JavaException(jenv, SWIG_RuntimeError, e); return 0;
1514 };
1515 }
1516 catch (const char *e) {
1517 {
1518 SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e); return 0;
1519 };
1520 }
1521 }
1522 if (result) jresult = jenv->NewStringUTF((const char *)result);
1523 if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
1524 return jresult;
1525 }
1526
1527
Java_org_chasen_crfpp_CRFPPJNI_Tagger_1what(JNIEnv * jenv,jclass jcls,jlong jarg1,jobject jarg1_)1528 SWIGEXPORT jstring JNICALL Java_org_chasen_crfpp_CRFPPJNI_Tagger_1what(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
1529 jstring jresult = 0 ;
1530 CRFPP::Tagger *arg1 = (CRFPP::Tagger *) 0 ;
1531 char *result = 0 ;
1532
1533 (void)jenv;
1534 (void)jcls;
1535 (void)jarg1_;
1536 arg1 = *(CRFPP::Tagger **)&jarg1;
1537 {
1538 try {
1539 result = (char *)(arg1)->what();
1540 }
1541 catch (char *e) {
1542 {
1543 SWIG_JavaException(jenv, SWIG_RuntimeError, e); return 0;
1544 };
1545 }
1546 catch (const char *e) {
1547 {
1548 SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e); return 0;
1549 };
1550 }
1551 }
1552 if (result) jresult = jenv->NewStringUTF((const char *)result);
1553 return jresult;
1554 }
1555
1556
Java_org_chasen_crfpp_CRFPPJNI_delete_1Tagger(JNIEnv * jenv,jclass jcls,jlong jarg1)1557 SWIGEXPORT void JNICALL Java_org_chasen_crfpp_CRFPPJNI_delete_1Tagger(JNIEnv *jenv, jclass jcls, jlong jarg1) {
1558 CRFPP::Tagger *arg1 = (CRFPP::Tagger *) 0 ;
1559
1560 (void)jenv;
1561 (void)jcls;
1562 arg1 = *(CRFPP::Tagger **)&jarg1;
1563 {
1564 try {
1565 delete arg1;
1566 }
1567 catch (char *e) {
1568 {
1569 SWIG_JavaException(jenv, SWIG_RuntimeError, e); return ;
1570 };
1571 }
1572 catch (const char *e) {
1573 {
1574 SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e); return ;
1575 };
1576 }
1577 }
1578 }
1579
1580
Java_org_chasen_crfpp_CRFPPJNI_new_1Tagger(JNIEnv * jenv,jclass jcls,jstring jarg1)1581 SWIGEXPORT jlong JNICALL Java_org_chasen_crfpp_CRFPPJNI_new_1Tagger(JNIEnv *jenv, jclass jcls, jstring jarg1) {
1582 jlong jresult = 0 ;
1583 char *arg1 = (char *) 0 ;
1584 CRFPP::Tagger *result = 0 ;
1585
1586 (void)jenv;
1587 (void)jcls;
1588 arg1 = 0;
1589 if (jarg1) {
1590 arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
1591 if (!arg1) return 0;
1592 }
1593 {
1594 try {
1595 result = (CRFPP::Tagger *)new_CRFPP_Tagger((char const *)arg1);
1596 }
1597 catch (char *e) {
1598 {
1599 SWIG_JavaException(jenv, SWIG_RuntimeError, e); return 0;
1600 };
1601 }
1602 catch (const char *e) {
1603 {
1604 SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e); return 0;
1605 };
1606 }
1607 }
1608 *(CRFPP::Tagger **)&jresult = result;
1609 if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
1610 return jresult;
1611 }
1612
1613
Java_org_chasen_crfpp_CRFPPJNI_VERSION_1get(JNIEnv * jenv,jclass jcls)1614 SWIGEXPORT jstring JNICALL Java_org_chasen_crfpp_CRFPPJNI_VERSION_1get(JNIEnv *jenv, jclass jcls) {
1615 jstring jresult = 0 ;
1616 char *result = 0 ;
1617
1618 (void)jenv;
1619 (void)jcls;
1620 result = (char *)("0.59");
1621 if (result) jresult = jenv->NewStringUTF((const char *)result);
1622 return jresult;
1623 }
1624
1625
1626 #ifdef __cplusplus
1627 }
1628 #endif
1629
1630