SWIGEXPORT jlong JNICALL Java_com_omtinez_pocketsphinx_pocketsphinxJNI_new_1Hypothesis(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2, jint jarg3) {
  jlong jresult = 0 ;
  char *arg1 = (char *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  Hypothesis *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = 0;
  if (jarg1) {
    arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0);
    if (!arg1) return 0;
  }
  arg2 = 0;
  if (jarg2) {
    arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0);
    if (!arg2) return 0;
  }
  arg3 = (int)jarg3; 
  result = (Hypothesis *)new_Hypothesis((char const *)arg1,(char const *)arg2,arg3);
  *(Hypothesis **)&jresult = result; 
  if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1);
  if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2);
  return jresult;
}
SWIGINTERN Hypothesis *ps_decoder_s_getHyp(struct ps_decoder_s *self){
		char const *hyp, *uttid;
		int32 best_score;
		hyp = ps_get_hyp(self, &best_score, &uttid);
		if (hyp == NULL)
			return NULL;
		else
			return new_Hypothesis(hyp, uttid, best_score);
	}
SWIGINTERN Hypothesis *Decoder_getHyp(Decoder *self){
		char const *hyp, *uttid;
		int32 best_score;
		hyp = ps_get_hyp(self, &best_score, &uttid);
		return new_Hypothesis(hyp, uttid, best_score);
	}
SWIGINTERN Hypothesis *Nbest_hyp(Nbest *self){
	    const char* hyp;
	    int32 score;
	    hyp = ps_nbest_hyp(self->nbest, &score);
	    return new_Hypothesis(hyp, "", score);
	}