Class: Mykytea::KyteaSentence

Inherits:
Object
  • Object
show all
Defined in:
ext/mykytea_wrap.cxx

Instance Method Summary collapse

Constructor Details

#initialize(*args, self) ⇒ Object



18028
18029
18030
18031
18032
18033
18034
18035
18036
18037
18038
18039
18040
18041
18042
18043
18044
18045
18046
18047
18048
18049
18050
18051
18052
18053
18054
18055
18056
18057
18058
18059
18060
18061
18062
# File 'ext/mykytea_wrap.cxx', line 18028

SWIGINTERN VALUE _wrap_new_KyteaSentence(int nargs, VALUE *args, VALUE self) {
  int argc;
  VALUE argv[2];
  int ii;
  
  argc = nargs;
  if (argc > 2) SWIG_fail;
  for (ii = 0; (ii < argc); ++ii) {
    argv[ii] = args[ii];
  }
  if (argc == 0) {
    return _wrap_new_KyteaSentence__SWIG_0(nargs, args, self);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_KyteaString, SWIG_POINTER_NO_NULL);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_KyteaString, SWIG_POINTER_NO_NULL);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_new_KyteaSentence__SWIG_1(nargs, args, self);
      }
    }
  }
  
fail:
  Ruby_Format_OverloadedError( argc, 2, "KyteaSentence.new", 
    "    KyteaSentence.new()\n"
    "    KyteaSentence.new(KyteaString const &str, KyteaString const &norm_str)\n");
  
  return Qnil;
}

Instance Method Details

#norm(*args) ⇒ Object



17815
17816
17817
17818
17819
17820
17821
17822
17823
17824
17825
17826
17827
17828
17829
17830
17831
17832
17833
17834
17835
17836
# File 'ext/mykytea_wrap.cxx', line 17815

SWIGINTERN VALUE
_wrap_KyteaSentence_norm_get(int argc, VALUE *argv, VALUE self) {
  kytea::KyteaSentence *arg1 = (kytea::KyteaSentence *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  KyteaString result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kytea__KyteaSentence, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kytea::KyteaSentence *","norm", 1, self )); 
  }
  arg1 = reinterpret_cast< kytea::KyteaSentence * >(argp1);
  result =  ((arg1)->norm);
  vresult = SWIG_NewPointerObj((new KyteaString(static_cast< const KyteaString& >(result))), SWIGTYPE_p_KyteaString, SWIG_POINTER_OWN |  0 );
  return vresult;
fail:
  return Qnil;
}

#norm=(*args) ⇒ Object



17780
17781
17782
17783
17784
17785
17786
17787
17788
17789
17790
17791
17792
17793
17794
17795
17796
17797
17798
17799
17800
17801
17802
17803
17804
17805
17806
17807
17808
17809
17810
17811
17812
# File 'ext/mykytea_wrap.cxx', line 17780

SWIGINTERN VALUE
_wrap_KyteaSentence_norm_set(int argc, VALUE *argv, VALUE self) {
  kytea::KyteaSentence *arg1 = (kytea::KyteaSentence *) 0 ;
  KyteaString arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kytea__KyteaSentence, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kytea::KyteaSentence *","norm", 1, self )); 
  }
  arg1 = reinterpret_cast< kytea::KyteaSentence * >(argp1);
  {
    res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_KyteaString,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "KyteaString","norm", 2, argv[0] )); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "KyteaString","norm", 2, argv[0]));
    } else {
      arg2 = *(reinterpret_cast< KyteaString * >(argp2));
    }
  }
  if (arg1) (arg1)->norm = arg2;
  return Qnil;
fail:
  return Qnil;
}

#refreshWS(*args) ⇒ Object



18065
18066
18067
18068
18069
18070
18071
18072
18073
18074
18075
18076
18077
18078
18079
18080
18081
18082
18083
18084
18085
18086
18087
18088
18089
18090
18091
18092
18093
18094
18095
18096
18097
18098
18099
# File 'ext/mykytea_wrap.cxx', line 18065

SWIGINTERN VALUE
_wrap_KyteaSentence_refreshWS(int argc, VALUE *argv, VALUE self) {
  kytea::KyteaSentence *arg1 = (kytea::KyteaSentence *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kytea__KyteaSentence, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kytea::KyteaSentence *","refreshWS", 1, self )); 
  }
  arg1 = reinterpret_cast< kytea::KyteaSentence * >(argp1);
  ecode2 = SWIG_AsVal_double(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","refreshWS", 2, argv[0] ));
  } 
  arg2 = static_cast< double >(val2);
  {
    try{
      (arg1)->refreshWS(arg2);
    } catch (const std::exception &e){
      SWIG_exception(SWIG_RuntimeError, e.what() );
    } catch (...) {
      SWIG_exception(SWIG_UnknownError, "Unknown exception");
    }
  }
  return Qnil;
fail:
  return Qnil;
}

#surface(*args) ⇒ Object



17756
17757
17758
17759
17760
17761
17762
17763
17764
17765
17766
17767
17768
17769
17770
17771
17772
17773
17774
17775
17776
17777
# File 'ext/mykytea_wrap.cxx', line 17756

SWIGINTERN VALUE
_wrap_KyteaSentence_surface_get(int argc, VALUE *argv, VALUE self) {
  kytea::KyteaSentence *arg1 = (kytea::KyteaSentence *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  KyteaString result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kytea__KyteaSentence, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kytea::KyteaSentence *","surface", 1, self )); 
  }
  arg1 = reinterpret_cast< kytea::KyteaSentence * >(argp1);
  result =  ((arg1)->surface);
  vresult = SWIG_NewPointerObj((new KyteaString(static_cast< const KyteaString& >(result))), SWIGTYPE_p_KyteaString, SWIG_POINTER_OWN |  0 );
  return vresult;
fail:
  return Qnil;
}

#surface=(*args) ⇒ Object



17721
17722
17723
17724
17725
17726
17727
17728
17729
17730
17731
17732
17733
17734
17735
17736
17737
17738
17739
17740
17741
17742
17743
17744
17745
17746
17747
17748
17749
17750
17751
17752
17753
# File 'ext/mykytea_wrap.cxx', line 17721

SWIGINTERN VALUE
_wrap_KyteaSentence_surface_set(int argc, VALUE *argv, VALUE self) {
  kytea::KyteaSentence *arg1 = (kytea::KyteaSentence *) 0 ;
  KyteaString arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kytea__KyteaSentence, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kytea::KyteaSentence *","surface", 1, self )); 
  }
  arg1 = reinterpret_cast< kytea::KyteaSentence * >(argp1);
  {
    res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_KyteaString,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "KyteaString","surface", 2, argv[0] )); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "KyteaString","surface", 2, argv[0]));
    } else {
      arg2 = *(reinterpret_cast< KyteaString * >(argp2));
    }
  }
  if (arg1) (arg1)->surface = arg2;
  return Qnil;
fail:
  return Qnil;
}

#words(*args) ⇒ Object



17921
17922
17923
17924
17925
17926
17927
17928
17929
17930
17931
17932
17933
17934
17935
17936
17937
17938
17939
17940
17941
17942
# File 'ext/mykytea_wrap.cxx', line 17921

SWIGINTERN VALUE
_wrap_KyteaSentence_words_get(int argc, VALUE *argv, VALUE self) {
  kytea::KyteaSentence *arg1 = (kytea::KyteaSentence *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  kytea::KyteaSentence::Words *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kytea__KyteaSentence, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kytea::KyteaSentence *","words", 1, self )); 
  }
  arg1 = reinterpret_cast< kytea::KyteaSentence * >(argp1);
  result = (kytea::KyteaSentence::Words *)& ((arg1)->words);
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_kytea__KyteaWord_std__allocatorT_kytea__KyteaWord_t_t, 0 |  0 );
  return vresult;
fail:
  return Qnil;
}

#words=(*args) ⇒ Object



17892
17893
17894
17895
17896
17897
17898
17899
17900
17901
17902
17903
17904
17905
17906
17907
17908
17909
17910
17911
17912
17913
17914
17915
17916
17917
17918
# File 'ext/mykytea_wrap.cxx', line 17892

SWIGINTERN VALUE
_wrap_KyteaSentence_words_set(int argc, VALUE *argv, VALUE self) {
  kytea::KyteaSentence *arg1 = (kytea::KyteaSentence *) 0 ;
  kytea::KyteaSentence::Words *arg2 = (kytea::KyteaSentence::Words *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kytea__KyteaSentence, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kytea::KyteaSentence *","words", 1, self )); 
  }
  arg1 = reinterpret_cast< kytea::KyteaSentence * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_std__vectorT_kytea__KyteaWord_std__allocatorT_kytea__KyteaWord_t_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "kytea::KyteaSentence::Words *","words", 2, argv[0] )); 
  }
  arg2 = reinterpret_cast< kytea::KyteaSentence::Words * >(argp2);
  if (arg1) (arg1)->words = *arg2;
  return Qnil;
fail:
  return Qnil;
}

#wsConfs(*args) ⇒ Object



17868
17869
17870
17871
17872
17873
17874
17875
17876
17877
17878
17879
17880
17881
17882
17883
17884
17885
17886
17887
17888
17889
# File 'ext/mykytea_wrap.cxx', line 17868

SWIGINTERN VALUE
_wrap_KyteaSentence_wsConfs_get(int argc, VALUE *argv, VALUE self) {
  kytea::KyteaSentence *arg1 = (kytea::KyteaSentence *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  kytea::KyteaSentence::Floats *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kytea__KyteaSentence, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kytea::KyteaSentence *","wsConfs", 1, self )); 
  }
  arg1 = reinterpret_cast< kytea::KyteaSentence * >(argp1);
  result = (kytea::KyteaSentence::Floats *)& ((arg1)->wsConfs);
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  return vresult;
fail:
  return Qnil;
}

#wsConfs=(*args) ⇒ Object



17839
17840
17841
17842
17843
17844
17845
17846
17847
17848
17849
17850
17851
17852
17853
17854
17855
17856
17857
17858
17859
17860
17861
17862
17863
17864
17865
# File 'ext/mykytea_wrap.cxx', line 17839

SWIGINTERN VALUE
_wrap_KyteaSentence_wsConfs_set(int argc, VALUE *argv, VALUE self) {
  kytea::KyteaSentence *arg1 = (kytea::KyteaSentence *) 0 ;
  kytea::KyteaSentence::Floats *arg2 = (kytea::KyteaSentence::Floats *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_kytea__KyteaSentence, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kytea::KyteaSentence *","wsConfs", 1, self )); 
  }
  arg1 = reinterpret_cast< kytea::KyteaSentence * >(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "kytea::KyteaSentence::Floats *","wsConfs", 2, argv[0] )); 
  }
  arg2 = reinterpret_cast< kytea::KyteaSentence::Floats * >(argp2);
  if (arg1) (arg1)->wsConfs = *arg2;
  return Qnil;
fail:
  return Qnil;
}