/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 1.3.27
 * 
 * This file is not intended to be easily readable and contains a number of 
 * coding conventions designed to improve portability and efficiency. Do not make
 * changes to this file unless you know what you are doing--modify the SWIG 
 * interface file instead. 
 * ----------------------------------------------------------------------------- */


#ifdef __cplusplus
template<class T> class SwigValueWrapper {
    T *tt;
public:
    SwigValueWrapper() : tt(0) { }
    SwigValueWrapper(const SwigValueWrapper<T>& rhs) : tt(new T(*rhs.tt)) { }
    SwigValueWrapper(const T& t) : tt(new T(t)) { }
    ~SwigValueWrapper() { delete tt; } 
    SwigValueWrapper& operator=(const T& t) { delete tt; tt = new T(t); return *this; }
    operator T&() const { return *tt; }
    T *operator&() { return tt; }
private:
    SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
};
#endif

/***********************************************************************
 *
 *  This section contains generic SWIG labels for method/variable
 *  declarations/attributes, and other compiler dependent labels.
 *
 ************************************************************************/

/* template workaround for compilers that cannot correctly implement the C++ standard */
#ifndef SWIGTEMPLATEDISAMBIGUATOR
#  if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
#    define SWIGTEMPLATEDISAMBIGUATOR template
#  else
#    define SWIGTEMPLATEDISAMBIGUATOR 
#  endif
#endif

/* inline attribute */
#ifndef SWIGINLINE
# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
#   define SWIGINLINE inline
# else
#   define SWIGINLINE
# endif
#endif

/* attribute recognised by some compilers to avoid 'unused' warnings */
#ifndef SWIGUNUSED
# if defined(__GNUC__) || defined(__ICC)
#   define SWIGUNUSED __attribute__ ((unused)) 
# else
#   define SWIGUNUSED 
# endif
#endif

/* internal SWIG method */
#ifndef SWIGINTERN
# define SWIGINTERN static SWIGUNUSED
#endif

/* internal inline SWIG method */
#ifndef SWIGINTERNINLINE
# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
#endif

/* exporting methods for Windows DLLs */
#ifndef SWIGEXPORT
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
#   if defined(STATIC_LINKED)
#     define SWIGEXPORT
#   else
#     define SWIGEXPORT __declspec(dllexport)
#   endif
# else
#   define SWIGEXPORT
# endif
#endif

/* calling conventions for Windows */
#ifndef SWIGSTDCALL
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
#   define SWIGSTDCALL __stdcall
# else
#   define SWIGSTDCALL
# endif 
#endif



/* Fix for jlong on some versions of gcc on Windows */
#if defined(__GNUC__) && !defined(__INTELC__)
  typedef long long __int64;
#endif

/* Fix for jlong on 64-bit x86 Solaris */
#if defined(__x86_64)
# ifdef _LP64
#   undef _LP64
# endif
#endif

#include <jni.h>
#include <stdlib.h>
#include <string.h>


/* Support for throwing Java exceptions */
typedef enum {
  SWIG_JavaOutOfMemoryError = 1, 
  SWIG_JavaIOException, 
  SWIG_JavaRuntimeException, 
  SWIG_JavaIndexOutOfBoundsException,
  SWIG_JavaArithmeticException,
  SWIG_JavaIllegalArgumentException,
  SWIG_JavaNullPointerException,
  SWIG_JavaDirectorPureVirtual,
  SWIG_JavaUnknownError
} SWIG_JavaExceptionCodes;

typedef struct {
  SWIG_JavaExceptionCodes code;
  const char *java_exception;
} SWIG_JavaExceptions_t;


static void SWIG_JavaThrowException(JNIEnv *jenv, SWIG_JavaExceptionCodes code, const char *msg) {
  jclass excep;
  static const SWIG_JavaExceptions_t java_exceptions[] = {
    { SWIG_JavaOutOfMemoryError, "java/lang/OutOfMemoryError" },
    { SWIG_JavaIOException, "java/io/IOException" },
    { SWIG_JavaRuntimeException, "java/lang/RuntimeException" },
    { SWIG_JavaIndexOutOfBoundsException, "java/lang/IndexOutOfBoundsException" },
    { SWIG_JavaArithmeticException, "java/lang/ArithmeticException" },
    { SWIG_JavaIllegalArgumentException, "java/lang/IllegalArgumentException" },
    { SWIG_JavaNullPointerException, "java/lang/NullPointerException" },
    { SWIG_JavaDirectorPureVirtual, "java/lang/RuntimeException" },
    { SWIG_JavaUnknownError,  "java/lang/UnknownError" },
    { (SWIG_JavaExceptionCodes)0,  "java/lang/UnknownError" } };
  const SWIG_JavaExceptions_t *except_ptr = java_exceptions;

  while (except_ptr->code != code && except_ptr->code)
    except_ptr++;

  jenv->ExceptionClear();
  excep = jenv->FindClass(except_ptr->java_exception);
  if (excep)
    jenv->ThrowNew(excep, msg);
}


/* Contract support */

#define SWIG_contract_assert(nullreturn, expr, msg) if (!(expr)) {SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, msg); return nullreturn; } else


#define  SWIG_MemoryError    1
#define  SWIG_IOError        2
#define  SWIG_RuntimeError   3
#define  SWIG_IndexError     4
#define  SWIG_TypeError      5
#define  SWIG_DivisionByZero 6
#define  SWIG_OverflowError  7
#define  SWIG_SyntaxError    8
#define  SWIG_ValueError     9
#define  SWIG_SystemError   10
#define  SWIG_UnknownError  99


SWIGINTERN void SWIG_JavaException(JNIEnv *jenv, int code, const char *msg) {
  SWIG_JavaExceptionCodes exception_code = SWIG_JavaUnknownError;
  switch(code) {
  case SWIG_MemoryError:
    exception_code = SWIG_JavaOutOfMemoryError;
    break;
  case SWIG_IOError:
    exception_code = SWIG_JavaIOException;
    break;
  case SWIG_SystemError:
  case SWIG_RuntimeError:
    exception_code = SWIG_JavaRuntimeException;
    break;
  case SWIG_OverflowError:
  case SWIG_IndexError:
    exception_code = SWIG_JavaIndexOutOfBoundsException;
    break;
  case SWIG_DivisionByZero:
    exception_code = SWIG_JavaArithmeticException;
    break;
  case SWIG_SyntaxError:
  case SWIG_ValueError:
  case SWIG_TypeError:
    exception_code = SWIG_JavaIllegalArgumentException;
    break;
  case SWIG_UnknownError:
  default:
    exception_code = SWIG_JavaUnknownError;
    break;
  }
  SWIG_JavaThrowException(jenv, exception_code, msg);
}


#include <stdexcept>


#include "mecab.h"



void delete_MeCab_Tagger (MeCab::Tagger *t) {
  delete t;
  t = 0;
}

MeCab::Tagger* new_MeCab_Tagger (const char *arg) {
  char *p = new char [strlen(arg) + 4];
  strcpy(p, "-C ");
  strcat(p, arg);
  MeCab::Tagger *tagger = MeCab::createTagger(p);
  delete [] p;
  if (! tagger) throw MeCab::getTaggerError();
  return tagger;
}

MeCab::Tagger* new_MeCab_Tagger () {
  MeCab::Tagger *tagger = MeCab::createTagger("-C");
  if (! tagger) throw MeCab::getTaggerError();
  return tagger;
}

char* mecab_node_t_surface_get(mecab_node_t *n)
{
    char *s = new char [n->length + 1];
    memcpy (s, n->surface, n->length);
    s[n->length] = '\0';
    return s;
}


static char const *MeCab_Tagger_parseToString__SWIG_0(MeCab::Tagger *self,char const *str,size_t length=0){
     return self->parse(str, length);
   }

#ifdef __cplusplus
extern "C" {
#endif

JNIEXPORT jlong JNICALL Java_org_chasen_mecab_MeCabJNI_Path_1rnode_1get(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong jresult = 0 ;
    mecab_path_t *arg1 = (mecab_path_t *) 0 ;
    mecab_node_t *result;
    
    (void)jenv;
    (void)jcls;
    arg1 = *(mecab_path_t **)(void *)&jarg1; 
    result = (mecab_node_t *) ((arg1)->rnode);
    
    *(mecab_node_t **)(void *)&jresult = result; 
    return jresult;
}


JNIEXPORT jlong JNICALL Java_org_chasen_mecab_MeCabJNI_Path_1rnext_1get(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong jresult = 0 ;
    mecab_path_t *arg1 = (mecab_path_t *) 0 ;
    mecab_path_t *result;
    
    (void)jenv;
    (void)jcls;
    arg1 = *(mecab_path_t **)(void *)&jarg1; 
    result = (mecab_path_t *) ((arg1)->rnext);
    
    *(mecab_path_t **)(void *)&jresult = result; 
    return jresult;
}


JNIEXPORT jlong JNICALL Java_org_chasen_mecab_MeCabJNI_Path_1lnode_1get(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong jresult = 0 ;
    mecab_path_t *arg1 = (mecab_path_t *) 0 ;
    mecab_node_t *result;
    
    (void)jenv;
    (void)jcls;
    arg1 = *(mecab_path_t **)(void *)&jarg1; 
    result = (mecab_node_t *) ((arg1)->lnode);
    
    *(mecab_node_t **)(void *)&jresult = result; 
    return jresult;
}


JNIEXPORT jlong JNICALL Java_org_chasen_mecab_MeCabJNI_Path_1lnext_1get(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong jresult = 0 ;
    mecab_path_t *arg1 = (mecab_path_t *) 0 ;
    mecab_path_t *result;
    
    (void)jenv;
    (void)jcls;
    arg1 = *(mecab_path_t **)(void *)&jarg1; 
    result = (mecab_path_t *) ((arg1)->lnext);
    
    *(mecab_path_t **)(void *)&jresult = result; 
    return jresult;
}


JNIEXPORT jint JNICALL Java_org_chasen_mecab_MeCabJNI_Path_1cost_1get(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jint jresult = 0 ;
    mecab_path_t *arg1 = (mecab_path_t *) 0 ;
    int result;
    
    (void)jenv;
    (void)jcls;
    arg1 = *(mecab_path_t **)(void *)&jarg1; 
    result = (int) ((arg1)->cost);
    
    jresult = (jint)result; 
    return jresult;
}


JNIEXPORT void JNICALL Java_org_chasen_mecab_MeCabJNI_Path_1prob_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jfloat jarg2) {
    mecab_path_t *arg1 = (mecab_path_t *) 0 ;
    float arg2 ;
    
    (void)jenv;
    (void)jcls;
    arg1 = *(mecab_path_t **)(void *)&jarg1; 
    arg2 = (float)jarg2; 
    if (arg1) (arg1)->prob = arg2;
    
}


JNIEXPORT jfloat JNICALL Java_org_chasen_mecab_MeCabJNI_Path_1prob_1get(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jfloat jresult = 0 ;
    mecab_path_t *arg1 = (mecab_path_t *) 0 ;
    float result;
    
    (void)jenv;
    (void)jcls;
    arg1 = *(mecab_path_t **)(void *)&jarg1; 
    result = (float) ((arg1)->prob);
    
    jresult = (jfloat)result; 
    return jresult;
}


JNIEXPORT jlong JNICALL Java_org_chasen_mecab_MeCabJNI_Node_1prev_1get(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong jresult = 0 ;
    mecab_node_t *arg1 = (mecab_node_t *) 0 ;
    mecab_node_t *result;
    
    (void)jenv;
    (void)jcls;
    arg1 = *(mecab_node_t **)(void *)&jarg1; 
    result = (mecab_node_t *) ((arg1)->prev);
    
    *(mecab_node_t **)(void *)&jresult = result; 
    return jresult;
}


JNIEXPORT jlong JNICALL Java_org_chasen_mecab_MeCabJNI_Node_1next_1get(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong jresult = 0 ;
    mecab_node_t *arg1 = (mecab_node_t *) 0 ;
    mecab_node_t *result;
    
    (void)jenv;
    (void)jcls;
    arg1 = *(mecab_node_t **)(void *)&jarg1; 
    result = (mecab_node_t *) ((arg1)->next);
    
    *(mecab_node_t **)(void *)&jresult = result; 
    return jresult;
}


JNIEXPORT jlong JNICALL Java_org_chasen_mecab_MeCabJNI_Node_1enext_1get(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong jresult = 0 ;
    mecab_node_t *arg1 = (mecab_node_t *) 0 ;
    mecab_node_t *result;
    
    (void)jenv;
    (void)jcls;
    arg1 = *(mecab_node_t **)(void *)&jarg1; 
    result = (mecab_node_t *) ((arg1)->enext);
    
    *(mecab_node_t **)(void *)&jresult = result; 
    return jresult;
}


JNIEXPORT jlong JNICALL Java_org_chasen_mecab_MeCabJNI_Node_1bnext_1get(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong jresult = 0 ;
    mecab_node_t *arg1 = (mecab_node_t *) 0 ;
    mecab_node_t *result;
    
    (void)jenv;
    (void)jcls;
    arg1 = *(mecab_node_t **)(void *)&jarg1; 
    result = (mecab_node_t *) ((arg1)->bnext);
    
    *(mecab_node_t **)(void *)&jresult = result; 
    return jresult;
}


JNIEXPORT jlong JNICALL Java_org_chasen_mecab_MeCabJNI_Node_1rpath_1get(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong jresult = 0 ;
    mecab_node_t *arg1 = (mecab_node_t *) 0 ;
    mecab_path_t *result;
    
    (void)jenv;
    (void)jcls;
    arg1 = *(mecab_node_t **)(void *)&jarg1; 
    result = (mecab_path_t *) ((arg1)->rpath);
    
    *(mecab_path_t **)(void *)&jresult = result; 
    return jresult;
}


JNIEXPORT jlong JNICALL Java_org_chasen_mecab_MeCabJNI_Node_1lpath_1get(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong jresult = 0 ;
    mecab_node_t *arg1 = (mecab_node_t *) 0 ;
    mecab_path_t *result;
    
    (void)jenv;
    (void)jcls;
    arg1 = *(mecab_node_t **)(void *)&jarg1; 
    result = (mecab_path_t *) ((arg1)->lpath);
    
    *(mecab_path_t **)(void *)&jresult = result; 
    return jresult;
}


JNIEXPORT jstring JNICALL Java_org_chasen_mecab_MeCabJNI_Node_1feature_1get(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jstring jresult = 0 ;
    mecab_node_t *arg1 = (mecab_node_t *) 0 ;
    char *result;
    
    (void)jenv;
    (void)jcls;
    arg1 = *(mecab_node_t **)(void *)&jarg1; 
    result = (char *) ((arg1)->feature);
    
    {
        if(result) jresult = jenv->NewStringUTF(result); 
    }
    return jresult;
}


JNIEXPORT jlong JNICALL Java_org_chasen_mecab_MeCabJNI_Node_1id_1get(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong jresult = 0 ;
    mecab_node_t *arg1 = (mecab_node_t *) 0 ;
    unsigned int result;
    
    (void)jenv;
    (void)jcls;
    arg1 = *(mecab_node_t **)(void *)&jarg1; 
    result = (unsigned int) ((arg1)->id);
    
    jresult = (jlong)result; 
    return jresult;
}


JNIEXPORT jint JNICALL Java_org_chasen_mecab_MeCabJNI_Node_1length_1get(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jint jresult = 0 ;
    mecab_node_t *arg1 = (mecab_node_t *) 0 ;
    unsigned short result;
    
    (void)jenv;
    (void)jcls;
    arg1 = *(mecab_node_t **)(void *)&jarg1; 
    result = (unsigned short) ((arg1)->length);
    
    jresult = (jint)result; 
    return jresult;
}


JNIEXPORT jint JNICALL Java_org_chasen_mecab_MeCabJNI_Node_1rlength_1get(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jint jresult = 0 ;
    mecab_node_t *arg1 = (mecab_node_t *) 0 ;
    unsigned short result;
    
    (void)jenv;
    (void)jcls;
    arg1 = *(mecab_node_t **)(void *)&jarg1; 
    result = (unsigned short) ((arg1)->rlength);
    
    jresult = (jint)result; 
    return jresult;
}


JNIEXPORT jint JNICALL Java_org_chasen_mecab_MeCabJNI_Node_1rcAttr_1get(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jint jresult = 0 ;
    mecab_node_t *arg1 = (mecab_node_t *) 0 ;
    unsigned short result;
    
    (void)jenv;
    (void)jcls;
    arg1 = *(mecab_node_t **)(void *)&jarg1; 
    result = (unsigned short) ((arg1)->rcAttr);
    
    jresult = (jint)result; 
    return jresult;
}


JNIEXPORT jint JNICALL Java_org_chasen_mecab_MeCabJNI_Node_1lcAttr_1get(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jint jresult = 0 ;
    mecab_node_t *arg1 = (mecab_node_t *) 0 ;
    unsigned short result;
    
    (void)jenv;
    (void)jcls;
    arg1 = *(mecab_node_t **)(void *)&jarg1; 
    result = (unsigned short) ((arg1)->lcAttr);
    
    jresult = (jint)result; 
    return jresult;
}


JNIEXPORT jint JNICALL Java_org_chasen_mecab_MeCabJNI_Node_1posid_1get(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jint jresult = 0 ;
    mecab_node_t *arg1 = (mecab_node_t *) 0 ;
    unsigned short result;
    
    (void)jenv;
    (void)jcls;
    arg1 = *(mecab_node_t **)(void *)&jarg1; 
    result = (unsigned short) ((arg1)->posid);
    
    jresult = (jint)result; 
    return jresult;
}


JNIEXPORT jshort JNICALL Java_org_chasen_mecab_MeCabJNI_Node_1char_1type_1get(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jshort jresult = 0 ;
    mecab_node_t *arg1 = (mecab_node_t *) 0 ;
    unsigned char result;
    
    (void)jenv;
    (void)jcls;
    arg1 = *(mecab_node_t **)(void *)&jarg1; 
    result = (unsigned char) ((arg1)->char_type);
    
    jresult = (jshort)result; 
    return jresult;
}


JNIEXPORT jshort JNICALL Java_org_chasen_mecab_MeCabJNI_Node_1stat_1get(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jshort jresult = 0 ;
    mecab_node_t *arg1 = (mecab_node_t *) 0 ;
    unsigned char result;
    
    (void)jenv;
    (void)jcls;
    arg1 = *(mecab_node_t **)(void *)&jarg1; 
    result = (unsigned char) ((arg1)->stat);
    
    jresult = (jshort)result; 
    return jresult;
}


JNIEXPORT jshort JNICALL Java_org_chasen_mecab_MeCabJNI_Node_1isbest_1get(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jshort jresult = 0 ;
    mecab_node_t *arg1 = (mecab_node_t *) 0 ;
    unsigned char result;
    
    (void)jenv;
    (void)jcls;
    arg1 = *(mecab_node_t **)(void *)&jarg1; 
    result = (unsigned char) ((arg1)->isbest);
    
    jresult = (jshort)result; 
    return jresult;
}


JNIEXPORT jfloat JNICALL Java_org_chasen_mecab_MeCabJNI_Node_1alpha_1get(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jfloat jresult = 0 ;
    mecab_node_t *arg1 = (mecab_node_t *) 0 ;
    float result;
    
    (void)jenv;
    (void)jcls;
    arg1 = *(mecab_node_t **)(void *)&jarg1; 
    result = (float) ((arg1)->alpha);
    
    jresult = (jfloat)result; 
    return jresult;
}


JNIEXPORT jfloat JNICALL Java_org_chasen_mecab_MeCabJNI_Node_1beta_1get(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jfloat jresult = 0 ;
    mecab_node_t *arg1 = (mecab_node_t *) 0 ;
    float result;
    
    (void)jenv;
    (void)jcls;
    arg1 = *(mecab_node_t **)(void *)&jarg1; 
    result = (float) ((arg1)->beta);
    
    jresult = (jfloat)result; 
    return jresult;
}


JNIEXPORT void JNICALL Java_org_chasen_mecab_MeCabJNI_Node_1prob_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jfloat jarg2) {
    mecab_node_t *arg1 = (mecab_node_t *) 0 ;
    float arg2 ;
    
    (void)jenv;
    (void)jcls;
    arg1 = *(mecab_node_t **)(void *)&jarg1; 
    arg2 = (float)jarg2; 
    if (arg1) (arg1)->prob = arg2;
    
}


JNIEXPORT jfloat JNICALL Java_org_chasen_mecab_MeCabJNI_Node_1prob_1get(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jfloat jresult = 0 ;
    mecab_node_t *arg1 = (mecab_node_t *) 0 ;
    float result;
    
    (void)jenv;
    (void)jcls;
    arg1 = *(mecab_node_t **)(void *)&jarg1; 
    result = (float) ((arg1)->prob);
    
    jresult = (jfloat)result; 
    return jresult;
}


JNIEXPORT jshort JNICALL Java_org_chasen_mecab_MeCabJNI_Node_1wcost_1get(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jshort jresult = 0 ;
    mecab_node_t *arg1 = (mecab_node_t *) 0 ;
    short result;
    
    (void)jenv;
    (void)jcls;
    arg1 = *(mecab_node_t **)(void *)&jarg1; 
    result = (short) ((arg1)->wcost);
    
    jresult = (jshort)result; 
    return jresult;
}


JNIEXPORT jint JNICALL Java_org_chasen_mecab_MeCabJNI_Node_1cost_1get(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jint jresult = 0 ;
    mecab_node_t *arg1 = (mecab_node_t *) 0 ;
    long result;
    
    (void)jenv;
    (void)jcls;
    arg1 = *(mecab_node_t **)(void *)&jarg1; 
    result = (long) ((arg1)->cost);
    
    jresult = (jint)result; 
    return jresult;
}


JNIEXPORT jstring JNICALL Java_org_chasen_mecab_MeCabJNI_Node_1surface_1get(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jstring jresult = 0 ;
    mecab_node_t *arg1 = (mecab_node_t *) 0 ;
    char *result;
    
    (void)jenv;
    (void)jcls;
    arg1 = *(mecab_node_t **)(void *)&jarg1; 
    {
        try {
            result = (char *)mecab_node_t_surface_get(arg1);
        }
        catch (char *e) {
            /*@/usr/local/share/swig/1.3.27/exception.i,193,SWIG_exception@*/
            {
                SWIG_JavaException(jenv, SWIG_RuntimeError, e);
                return 0;
            }
            /*@@*/; 
        }
        catch (const char *e) {
            /*@/usr/local/share/swig/1.3.27/exception.i,193,SWIG_exception@*/
            {
                SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e);
                return 0;
            }
            /*@@*/; 
        }
    }
    {
        if(result) jresult = jenv->NewStringUTF(result); 
    }
    delete [] result;
    return jresult;
}


JNIEXPORT jint JNICALL Java_org_chasen_mecab_MeCabJNI_MECAB_1NOR_1NODE_1get(JNIEnv *jenv, jclass jcls) {
    jint jresult = 0 ;
    int result;
    
    (void)jenv;
    (void)jcls;
    {
        try {
            result = (int) 0;
        }
        catch (char *e) {
            /*@/usr/local/share/swig/1.3.27/exception.i,193,SWIG_exception@*/
            {
                SWIG_JavaException(jenv, SWIG_RuntimeError, e);
                return 0;
            }
            /*@@*/; 
        }
        catch (const char *e) {
            /*@/usr/local/share/swig/1.3.27/exception.i,193,SWIG_exception@*/
            {
                SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e);
                return 0;
            }
            /*@@*/; 
        }
    }
    jresult = (jint)result; 
    return jresult;
}


JNIEXPORT jint JNICALL Java_org_chasen_mecab_MeCabJNI_MECAB_1UNK_1NODE_1get(JNIEnv *jenv, jclass jcls) {
    jint jresult = 0 ;
    int result;
    
    (void)jenv;
    (void)jcls;
    {
        try {
            result = (int) 1;
        }
        catch (char *e) {
            /*@/usr/local/share/swig/1.3.27/exception.i,193,SWIG_exception@*/
            {
                SWIG_JavaException(jenv, SWIG_RuntimeError, e);
                return 0;
            }
            /*@@*/; 
        }
        catch (const char *e) {
            /*@/usr/local/share/swig/1.3.27/exception.i,193,SWIG_exception@*/
            {
                SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e);
                return 0;
            }
            /*@@*/; 
        }
    }
    jresult = (jint)result; 
    return jresult;
}


JNIEXPORT jint JNICALL Java_org_chasen_mecab_MeCabJNI_MECAB_1BOS_1NODE_1get(JNIEnv *jenv, jclass jcls) {
    jint jresult = 0 ;
    int result;
    
    (void)jenv;
    (void)jcls;
    {
        try {
            result = (int) 2;
        }
        catch (char *e) {
            /*@/usr/local/share/swig/1.3.27/exception.i,193,SWIG_exception@*/
            {
                SWIG_JavaException(jenv, SWIG_RuntimeError, e);
                return 0;
            }
            /*@@*/; 
        }
        catch (const char *e) {
            /*@/usr/local/share/swig/1.3.27/exception.i,193,SWIG_exception@*/
            {
                SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e);
                return 0;
            }
            /*@@*/; 
        }
    }
    jresult = (jint)result; 
    return jresult;
}


JNIEXPORT jint JNICALL Java_org_chasen_mecab_MeCabJNI_MECAB_1EOS_1NODE_1get(JNIEnv *jenv, jclass jcls) {
    jint jresult = 0 ;
    int result;
    
    (void)jenv;
    (void)jcls;
    {
        try {
            result = (int) 3;
        }
        catch (char *e) {
            /*@/usr/local/share/swig/1.3.27/exception.i,193,SWIG_exception@*/
            {
                SWIG_JavaException(jenv, SWIG_RuntimeError, e);
                return 0;
            }
            /*@@*/; 
        }
        catch (const char *e) {
            /*@/usr/local/share/swig/1.3.27/exception.i,193,SWIG_exception@*/
            {
                SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e);
                return 0;
            }
            /*@@*/; 
        }
    }
    jresult = (jint)result; 
    return jresult;
}


JNIEXPORT jstring JNICALL Java_org_chasen_mecab_MeCabJNI_Tagger_1parse(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) {
    jstring jresult = 0 ;
    MeCab::Tagger *arg1 = (MeCab::Tagger *) 0 ;
    char *arg2 = (char *) 0 ;
    char *result;
    
    (void)jenv;
    (void)jcls;
    arg1 = *(MeCab::Tagger **)(void *)&jarg1; 
    {
        arg2 = 0;
        if (jarg2) {
            arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
            if (!arg2) return 0;
        }
    }
    {
        try {
            result = (char *)(arg1)->parse((char const *)arg2);
        }
        catch (char *e) {
            /*@/usr/local/share/swig/1.3.27/exception.i,193,SWIG_exception@*/
            {
                SWIG_JavaException(jenv, SWIG_RuntimeError, e);
                return 0;
            }
            /*@@*/; 
        }
        catch (const char *e) {
            /*@/usr/local/share/swig/1.3.27/exception.i,193,SWIG_exception@*/
            {
                SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e);
                return 0;
            }
            /*@@*/; 
        }
    }
    {
        if(result) jresult = jenv->NewStringUTF(result); 
    }
    {
        if (arg2) jenv->ReleaseStringUTFChars(jarg2, arg2); 
    }
    return jresult;
}


JNIEXPORT jlong JNICALL Java_org_chasen_mecab_MeCabJNI_Tagger_1parseToNode(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) {
    jlong jresult = 0 ;
    MeCab::Tagger *arg1 = (MeCab::Tagger *) 0 ;
    char *arg2 = (char *) 0 ;
    MeCab::Node *result;
    
    (void)jenv;
    (void)jcls;
    arg1 = *(MeCab::Tagger **)(void *)&jarg1; 
    {
        arg2 = 0;
        if (jarg2) {
            arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
            if (!arg2) return 0;
        }
    }
    {
        try {
            result = (MeCab::Node *)(arg1)->parseToNode((char const *)arg2);
        }
        catch (char *e) {
            /*@/usr/local/share/swig/1.3.27/exception.i,193,SWIG_exception@*/
            {
                SWIG_JavaException(jenv, SWIG_RuntimeError, e);
                return 0;
            }
            /*@@*/; 
        }
        catch (const char *e) {
            /*@/usr/local/share/swig/1.3.27/exception.i,193,SWIG_exception@*/
            {
                SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e);
                return 0;
            }
            /*@@*/; 
        }
    }
    *(MeCab::Node **)(void *)&jresult = result; 
    {
        if (arg2) jenv->ReleaseStringUTFChars(jarg2, arg2); 
    }
    return jresult;
}


JNIEXPORT jstring JNICALL Java_org_chasen_mecab_MeCabJNI_Tagger_1parseNBest(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jstring jarg3) {
    jstring jresult = 0 ;
    MeCab::Tagger *arg1 = (MeCab::Tagger *) 0 ;
    size_t arg2 ;
    char *arg3 = (char *) 0 ;
    char *result;
    
    (void)jenv;
    (void)jcls;
    arg1 = *(MeCab::Tagger **)(void *)&jarg1; 
    arg2 = (size_t)jarg2; 
    {
        arg3 = 0;
        if (jarg3) {
            arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
            if (!arg3) return 0;
        }
    }
    {
        try {
            result = (char *)(arg1)->parseNBest(arg2,(char const *)arg3);
        }
        catch (char *e) {
            /*@/usr/local/share/swig/1.3.27/exception.i,193,SWIG_exception@*/
            {
                SWIG_JavaException(jenv, SWIG_RuntimeError, e);
                return 0;
            }
            /*@@*/; 
        }
        catch (const char *e) {
            /*@/usr/local/share/swig/1.3.27/exception.i,193,SWIG_exception@*/
            {
                SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e);
                return 0;
            }
            /*@@*/; 
        }
    }
    {
        if(result) jresult = jenv->NewStringUTF(result); 
    }
    {
        if (arg3) jenv->ReleaseStringUTFChars(jarg3, arg3); 
    }
    return jresult;
}


JNIEXPORT jboolean JNICALL Java_org_chasen_mecab_MeCabJNI_Tagger_1parseNBestInit(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) {
    jboolean jresult = 0 ;
    MeCab::Tagger *arg1 = (MeCab::Tagger *) 0 ;
    char *arg2 = (char *) 0 ;
    bool result;
    
    (void)jenv;
    (void)jcls;
    arg1 = *(MeCab::Tagger **)(void *)&jarg1; 
    {
        arg2 = 0;
        if (jarg2) {
            arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
            if (!arg2) return 0;
        }
    }
    {
        try {
            result = (bool)(arg1)->parseNBestInit((char const *)arg2);
        }
        catch (char *e) {
            /*@/usr/local/share/swig/1.3.27/exception.i,193,SWIG_exception@*/
            {
                SWIG_JavaException(jenv, SWIG_RuntimeError, e);
                return 0;
            }
            /*@@*/; 
        }
        catch (const char *e) {
            /*@/usr/local/share/swig/1.3.27/exception.i,193,SWIG_exception@*/
            {
                SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e);
                return 0;
            }
            /*@@*/; 
        }
    }
    jresult = (jboolean)result; 
    {
        if (arg2) jenv->ReleaseStringUTFChars(jarg2, arg2); 
    }
    return jresult;
}


JNIEXPORT jlong JNICALL Java_org_chasen_mecab_MeCabJNI_Tagger_1nextNode(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong jresult = 0 ;
    MeCab::Tagger *arg1 = (MeCab::Tagger *) 0 ;
    MeCab::Node *result;
    
    (void)jenv;
    (void)jcls;
    arg1 = *(MeCab::Tagger **)(void *)&jarg1; 
    {
        try {
            result = (MeCab::Node *)(arg1)->nextNode();
        }
        catch (char *e) {
            /*@/usr/local/share/swig/1.3.27/exception.i,193,SWIG_exception@*/
            {
                SWIG_JavaException(jenv, SWIG_RuntimeError, e);
                return 0;
            }
            /*@@*/; 
        }
        catch (const char *e) {
            /*@/usr/local/share/swig/1.3.27/exception.i,193,SWIG_exception@*/
            {
                SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e);
                return 0;
            }
            /*@@*/; 
        }
    }
    *(MeCab::Node **)(void *)&jresult = result; 
    return jresult;
}


JNIEXPORT jstring JNICALL Java_org_chasen_mecab_MeCabJNI_Tagger_1next(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jstring jresult = 0 ;
    MeCab::Tagger *arg1 = (MeCab::Tagger *) 0 ;
    char *result;
    
    (void)jenv;
    (void)jcls;
    arg1 = *(MeCab::Tagger **)(void *)&jarg1; 
    {
        try {
            result = (char *)(arg1)->next();
        }
        catch (char *e) {
            /*@/usr/local/share/swig/1.3.27/exception.i,193,SWIG_exception@*/
            {
                SWIG_JavaException(jenv, SWIG_RuntimeError, e);
                return 0;
            }
            /*@@*/; 
        }
        catch (const char *e) {
            /*@/usr/local/share/swig/1.3.27/exception.i,193,SWIG_exception@*/
            {
                SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e);
                return 0;
            }
            /*@@*/; 
        }
    }
    {
        if(result) jresult = jenv->NewStringUTF(result); 
    }
    return jresult;
}


JNIEXPORT jstring JNICALL Java_org_chasen_mecab_MeCabJNI_Tagger_1formatNode(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2) {
    jstring jresult = 0 ;
    MeCab::Tagger *arg1 = (MeCab::Tagger *) 0 ;
    MeCab::Node *arg2 = (MeCab::Node *) 0 ;
    char *result;
    
    (void)jenv;
    (void)jcls;
    arg1 = *(MeCab::Tagger **)(void *)&jarg1; 
    arg2 = *(MeCab::Node **)(void *)&jarg2; 
    {
        try {
            result = (char *)(arg1)->formatNode(arg2);
        }
        catch (char *e) {
            /*@/usr/local/share/swig/1.3.27/exception.i,193,SWIG_exception@*/
            {
                SWIG_JavaException(jenv, SWIG_RuntimeError, e);
                return 0;
            }
            /*@@*/; 
        }
        catch (const char *e) {
            /*@/usr/local/share/swig/1.3.27/exception.i,193,SWIG_exception@*/
            {
                SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e);
                return 0;
            }
            /*@@*/; 
        }
    }
    {
        if(result) jresult = jenv->NewStringUTF(result); 
    }
    return jresult;
}


JNIEXPORT jstring JNICALL Java_org_chasen_mecab_MeCabJNI_Tagger_1what(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jstring jresult = 0 ;
    MeCab::Tagger *arg1 = (MeCab::Tagger *) 0 ;
    char *result;
    
    (void)jenv;
    (void)jcls;
    arg1 = *(MeCab::Tagger **)(void *)&jarg1; 
    {
        try {
            result = (char *)(arg1)->what();
        }
        catch (char *e) {
            /*@/usr/local/share/swig/1.3.27/exception.i,193,SWIG_exception@*/
            {
                SWIG_JavaException(jenv, SWIG_RuntimeError, e);
                return 0;
            }
            /*@@*/; 
        }
        catch (const char *e) {
            /*@/usr/local/share/swig/1.3.27/exception.i,193,SWIG_exception@*/
            {
                SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e);
                return 0;
            }
            /*@@*/; 
        }
    }
    {
        if(result) jresult = jenv->NewStringUTF(result); 
    }
    return jresult;
}


JNIEXPORT void JNICALL Java_org_chasen_mecab_MeCabJNI_delete_1Tagger(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    MeCab::Tagger *arg1 = (MeCab::Tagger *) 0 ;
    
    (void)jenv;
    (void)jcls;
    arg1 = *(MeCab::Tagger **)(void *)&jarg1; 
    {
        try {
            delete arg1;
        }
        catch (char *e) {
            /*@/usr/local/share/swig/1.3.27/exception.i,193,SWIG_exception@*/
            {
                SWIG_JavaException(jenv, SWIG_RuntimeError, e);
                return ;
            }
            /*@@*/; 
        }
        catch (const char *e) {
            /*@/usr/local/share/swig/1.3.27/exception.i,193,SWIG_exception@*/
            {
                SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e);
                return ;
            }
            /*@@*/; 
        }
    }
}


JNIEXPORT jlong JNICALL Java_org_chasen_mecab_MeCabJNI_new_1Tagger_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jstring jarg1) {
    jlong jresult = 0 ;
    char *arg1 = (char *) 0 ;
    MeCab::Tagger *result;
    
    (void)jenv;
    (void)jcls;
    {
        arg1 = 0;
        if (jarg1) {
            arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
            if (!arg1) return 0;
        }
    }
    {
        try {
            result = (MeCab::Tagger *)new_MeCab_Tagger((char const *)arg1);
        }
        catch (char *e) {
            /*@/usr/local/share/swig/1.3.27/exception.i,193,SWIG_exception@*/
            {
                SWIG_JavaException(jenv, SWIG_RuntimeError, e);
                return 0;
            }
            /*@@*/; 
        }
        catch (const char *e) {
            /*@/usr/local/share/swig/1.3.27/exception.i,193,SWIG_exception@*/
            {
                SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e);
                return 0;
            }
            /*@@*/; 
        }
    }
    *(MeCab::Tagger **)(void *)&jresult = result; 
    {
        if (arg1) jenv->ReleaseStringUTFChars(jarg1, arg1); 
    }
    return jresult;
}


JNIEXPORT jlong JNICALL Java_org_chasen_mecab_MeCabJNI_new_1Tagger_1_1SWIG_11(JNIEnv *jenv, jclass jcls) {
    jlong jresult = 0 ;
    MeCab::Tagger *result;
    
    (void)jenv;
    (void)jcls;
    {
        try {
            result = (MeCab::Tagger *)new_MeCab_Tagger();
        }
        catch (char *e) {
            /*@/usr/local/share/swig/1.3.27/exception.i,193,SWIG_exception@*/
            {
                SWIG_JavaException(jenv, SWIG_RuntimeError, e);
                return 0;
            }
            /*@@*/; 
        }
        catch (const char *e) {
            /*@/usr/local/share/swig/1.3.27/exception.i,193,SWIG_exception@*/
            {
                SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e);
                return 0;
            }
            /*@@*/; 
        }
    }
    *(MeCab::Tagger **)(void *)&jresult = result; 
    return jresult;
}


JNIEXPORT jstring JNICALL Java_org_chasen_mecab_MeCabJNI_Tagger_1parseToString_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jlong jarg3) {
    jstring jresult = 0 ;
    MeCab::Tagger *arg1 = (MeCab::Tagger *) 0 ;
    char *arg2 = (char *) 0 ;
    size_t arg3 ;
    char *result;
    
    (void)jenv;
    (void)jcls;
    arg1 = *(MeCab::Tagger **)(void *)&jarg1; 
    {
        arg2 = 0;
        if (jarg2) {
            arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
            if (!arg2) return 0;
        }
    }
    arg3 = (size_t)jarg3; 
    {
        try {
            result = (char *)MeCab_Tagger_parseToString__SWIG_0(arg1,(char const *)arg2,arg3);
        }
        catch (char *e) {
            /*@/usr/local/share/swig/1.3.27/exception.i,193,SWIG_exception@*/
            {
                SWIG_JavaException(jenv, SWIG_RuntimeError, e);
                return 0;
            }
            /*@@*/; 
        }
        catch (const char *e) {
            /*@/usr/local/share/swig/1.3.27/exception.i,193,SWIG_exception@*/
            {
                SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e);
                return 0;
            }
            /*@@*/; 
        }
    }
    {
        if(result) jresult = jenv->NewStringUTF(result); 
    }
    {
        if (arg2) jenv->ReleaseStringUTFChars(jarg2, arg2); 
    }
    return jresult;
}


JNIEXPORT jstring JNICALL Java_org_chasen_mecab_MeCabJNI_Tagger_1parseToString_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) {
    jstring jresult = 0 ;
    MeCab::Tagger *arg1 = (MeCab::Tagger *) 0 ;
    char *arg2 = (char *) 0 ;
    char *result;
    
    (void)jenv;
    (void)jcls;
    arg1 = *(MeCab::Tagger **)(void *)&jarg1; 
    {
        arg2 = 0;
        if (jarg2) {
            arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
            if (!arg2) return 0;
        }
    }
    {
        try {
            result = (char *)MeCab_Tagger_parseToString__SWIG_0(arg1,(char const *)arg2);
        }
        catch (char *e) {
            /*@/usr/local/share/swig/1.3.27/exception.i,193,SWIG_exception@*/
            {
                SWIG_JavaException(jenv, SWIG_RuntimeError, e);
                return 0;
            }
            /*@@*/; 
        }
        catch (const char *e) {
            /*@/usr/local/share/swig/1.3.27/exception.i,193,SWIG_exception@*/
            {
                SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e);
                return 0;
            }
            /*@@*/; 
        }
    }
    {
        if(result) jresult = jenv->NewStringUTF(result); 
    }
    {
        if (arg2) jenv->ReleaseStringUTFChars(jarg2, arg2); 
    }
    return jresult;
}


JNIEXPORT jstring JNICALL Java_org_chasen_mecab_MeCabJNI_VERSION_1get(JNIEnv *jenv, jclass jcls) {
    jstring jresult = 0 ;
    char *result;
    
    (void)jenv;
    (void)jcls;
    {
        try {
            result = (char *) "0.90rc7";
        }
        catch (char *e) {
            /*@/usr/local/share/swig/1.3.27/exception.i,193,SWIG_exception@*/
            {
                SWIG_JavaException(jenv, SWIG_RuntimeError, e);
                return 0;
            }
            /*@@*/; 
        }
        catch (const char *e) {
            /*@/usr/local/share/swig/1.3.27/exception.i,193,SWIG_exception@*/
            {
                SWIG_JavaException(jenv, SWIG_RuntimeError, (char*)e);
                return 0;
            }
            /*@@*/; 
        }
    }
    {
        if(result) jresult = jenv->NewStringUTF(result); 
    }
    return jresult;
}


#ifdef __cplusplus
}
#endif

