opener-opinion-detector-basic 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (168) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +30 -0
  3. data/bin/opinion-detector-basic +19 -0
  4. data/bin/opinion-detector-basic-server +10 -0
  5. data/config.ru +4 -0
  6. data/core/opinion_detector_basic_multi.py +499 -0
  7. data/core/packages/KafNafParser-1.3.tar.gz +0 -0
  8. data/core/packages/VUA_pylib-1.4.tar.gz +0 -0
  9. data/core/site-packages/pre_build/VUKafParserPy-1.0-py2.7.egg-info/PKG-INFO +10 -0
  10. data/core/site-packages/pre_build/VUKafParserPy-1.0-py2.7.egg-info/SOURCES.txt +7 -0
  11. data/core/site-packages/pre_build/VUKafParserPy-1.0-py2.7.egg-info/dependency_links.txt +1 -0
  12. data/core/site-packages/pre_build/VUKafParserPy-1.0-py2.7.egg-info/installed-files.txt +11 -0
  13. data/core/site-packages/pre_build/VUKafParserPy-1.0-py2.7.egg-info/top_level.txt +1 -0
  14. data/core/site-packages/pre_build/VUKafParserPy/KafDataObjectsMod.py +165 -0
  15. data/core/site-packages/pre_build/VUKafParserPy/KafDataObjectsMod.pyc +0 -0
  16. data/core/site-packages/pre_build/VUKafParserPy/KafParserMod.py +439 -0
  17. data/core/site-packages/pre_build/VUKafParserPy/KafParserMod.pyc +0 -0
  18. data/core/site-packages/pre_build/VUKafParserPy/__init__.py +7 -0
  19. data/core/site-packages/pre_build/VUKafParserPy/__init__.pyc +0 -0
  20. data/core/vendor/src/crfsuite/AUTHORS +1 -0
  21. data/core/vendor/src/crfsuite/COPYING +27 -0
  22. data/core/vendor/src/crfsuite/ChangeLog +103 -0
  23. data/core/vendor/src/crfsuite/INSTALL +236 -0
  24. data/core/vendor/src/crfsuite/Makefile.am +19 -0
  25. data/core/vendor/src/crfsuite/Makefile.in +783 -0
  26. data/core/vendor/src/crfsuite/README +183 -0
  27. data/core/vendor/src/crfsuite/aclocal.m4 +9018 -0
  28. data/core/vendor/src/crfsuite/autogen.sh +38 -0
  29. data/core/vendor/src/crfsuite/compile +143 -0
  30. data/core/vendor/src/crfsuite/config.guess +1502 -0
  31. data/core/vendor/src/crfsuite/config.h.in +198 -0
  32. data/core/vendor/src/crfsuite/config.sub +1714 -0
  33. data/core/vendor/src/crfsuite/configure +14273 -0
  34. data/core/vendor/src/crfsuite/configure.in +149 -0
  35. data/core/vendor/src/crfsuite/crfsuite.sln +42 -0
  36. data/core/vendor/src/crfsuite/depcomp +630 -0
  37. data/core/vendor/src/crfsuite/example/chunking.py +49 -0
  38. data/core/vendor/src/crfsuite/example/crfutils.py +179 -0
  39. data/core/vendor/src/crfsuite/example/ner.py +270 -0
  40. data/core/vendor/src/crfsuite/example/pos.py +78 -0
  41. data/core/vendor/src/crfsuite/example/template.py +88 -0
  42. data/core/vendor/src/crfsuite/frontend/Makefile.am +29 -0
  43. data/core/vendor/src/crfsuite/frontend/Makefile.in +640 -0
  44. data/core/vendor/src/crfsuite/frontend/dump.c +116 -0
  45. data/core/vendor/src/crfsuite/frontend/frontend.vcxproj +129 -0
  46. data/core/vendor/src/crfsuite/frontend/iwa.c +273 -0
  47. data/core/vendor/src/crfsuite/frontend/iwa.h +65 -0
  48. data/core/vendor/src/crfsuite/frontend/learn.c +439 -0
  49. data/core/vendor/src/crfsuite/frontend/main.c +137 -0
  50. data/core/vendor/src/crfsuite/frontend/option.c +93 -0
  51. data/core/vendor/src/crfsuite/frontend/option.h +86 -0
  52. data/core/vendor/src/crfsuite/frontend/readdata.h +38 -0
  53. data/core/vendor/src/crfsuite/frontend/reader.c +136 -0
  54. data/core/vendor/src/crfsuite/frontend/tag.c +427 -0
  55. data/core/vendor/src/crfsuite/genbinary.sh.in +15 -0
  56. data/core/vendor/src/crfsuite/include/Makefile.am +11 -0
  57. data/core/vendor/src/crfsuite/include/Makefile.in +461 -0
  58. data/core/vendor/src/crfsuite/include/crfsuite.h +1063 -0
  59. data/core/vendor/src/crfsuite/include/crfsuite.hpp +555 -0
  60. data/core/vendor/src/crfsuite/include/crfsuite_api.hpp +400 -0
  61. data/core/vendor/src/crfsuite/include/os.h +61 -0
  62. data/core/vendor/src/crfsuite/install-sh +520 -0
  63. data/core/vendor/src/crfsuite/lib/cqdb/COPYING +28 -0
  64. data/core/vendor/src/crfsuite/lib/cqdb/Makefile.am +21 -0
  65. data/core/vendor/src/crfsuite/lib/cqdb/Makefile.in +549 -0
  66. data/core/vendor/src/crfsuite/lib/cqdb/cqdb.vcxproj +86 -0
  67. data/core/vendor/src/crfsuite/lib/cqdb/include/cqdb.h +524 -0
  68. data/core/vendor/src/crfsuite/lib/cqdb/src/cqdb.c +587 -0
  69. data/core/vendor/src/crfsuite/lib/cqdb/src/lookup3.c +976 -0
  70. data/core/vendor/src/crfsuite/lib/crf/Makefile.am +46 -0
  71. data/core/vendor/src/crfsuite/lib/crf/Makefile.in +721 -0
  72. data/core/vendor/src/crfsuite/lib/crf/crf.vcxproj +216 -0
  73. data/core/vendor/src/crfsuite/lib/crf/src/crf1d.h +353 -0
  74. data/core/vendor/src/crfsuite/lib/crf/src/crf1d_context.c +705 -0
  75. data/core/vendor/src/crfsuite/lib/crf/src/crf1d_encode.c +943 -0
  76. data/core/vendor/src/crfsuite/lib/crf/src/crf1d_feature.c +352 -0
  77. data/core/vendor/src/crfsuite/lib/crf/src/crf1d_model.c +994 -0
  78. data/core/vendor/src/crfsuite/lib/crf/src/crf1d_tag.c +550 -0
  79. data/core/vendor/src/crfsuite/lib/crf/src/crfsuite.c +492 -0
  80. data/core/vendor/src/crfsuite/lib/crf/src/crfsuite_internal.h +236 -0
  81. data/core/vendor/src/crfsuite/lib/crf/src/crfsuite_train.c +272 -0
  82. data/core/vendor/src/crfsuite/lib/crf/src/dataset.c +106 -0
  83. data/core/vendor/src/crfsuite/lib/crf/src/dictionary.c +118 -0
  84. data/core/vendor/src/crfsuite/lib/crf/src/holdout.c +80 -0
  85. data/core/vendor/src/crfsuite/lib/crf/src/logging.c +91 -0
  86. data/core/vendor/src/crfsuite/lib/crf/src/logging.h +48 -0
  87. data/core/vendor/src/crfsuite/lib/crf/src/params.c +335 -0
  88. data/core/vendor/src/crfsuite/lib/crf/src/params.h +80 -0
  89. data/core/vendor/src/crfsuite/lib/crf/src/quark.c +172 -0
  90. data/core/vendor/src/crfsuite/lib/crf/src/quark.h +46 -0
  91. data/core/vendor/src/crfsuite/lib/crf/src/rumavl.c +1107 -0
  92. data/core/vendor/src/crfsuite/lib/crf/src/rumavl.h +160 -0
  93. data/core/vendor/src/crfsuite/lib/crf/src/train_arow.c +408 -0
  94. data/core/vendor/src/crfsuite/lib/crf/src/train_averaged_perceptron.c +242 -0
  95. data/core/vendor/src/crfsuite/lib/crf/src/train_l2sgd.c +507 -0
  96. data/core/vendor/src/crfsuite/lib/crf/src/train_lbfgs.c +338 -0
  97. data/core/vendor/src/crfsuite/lib/crf/src/train_passive_aggressive.c +435 -0
  98. data/core/vendor/src/crfsuite/lib/crf/src/vecmath.h +341 -0
  99. data/core/vendor/src/crfsuite/ltmain.sh +8413 -0
  100. data/core/vendor/src/crfsuite/missing +376 -0
  101. data/core/vendor/src/crfsuite/swig/Makefile.am +13 -0
  102. data/core/vendor/src/crfsuite/swig/Makefile.in +365 -0
  103. data/core/vendor/src/crfsuite/swig/crfsuite.cpp +2 -0
  104. data/core/vendor/src/crfsuite/swig/export.i +32 -0
  105. data/core/vendor/src/crfsuite/swig/python/README +92 -0
  106. data/core/vendor/src/crfsuite/swig/python/crfsuite.py +329 -0
  107. data/core/vendor/src/crfsuite/swig/python/export_wrap.cpp +14355 -0
  108. data/core/vendor/src/crfsuite/swig/python/export_wrap.h +63 -0
  109. data/core/vendor/src/crfsuite/swig/python/prepare.sh +9 -0
  110. data/core/vendor/src/crfsuite/swig/python/sample_tag.py +52 -0
  111. data/core/vendor/src/crfsuite/swig/python/sample_train.py +68 -0
  112. data/core/vendor/src/crfsuite/swig/python/setup.py +44 -0
  113. data/core/vendor/src/crfsuite/win32/stdint.h +679 -0
  114. data/core/vendor/src/liblbfgs/AUTHORS +1 -0
  115. data/core/vendor/src/liblbfgs/COPYING +22 -0
  116. data/core/vendor/src/liblbfgs/ChangeLog +120 -0
  117. data/core/vendor/src/liblbfgs/INSTALL +231 -0
  118. data/core/vendor/src/liblbfgs/Makefile.am +10 -0
  119. data/core/vendor/src/liblbfgs/Makefile.in +638 -0
  120. data/core/vendor/src/liblbfgs/NEWS +0 -0
  121. data/core/vendor/src/liblbfgs/README +71 -0
  122. data/core/vendor/src/liblbfgs/aclocal.m4 +6985 -0
  123. data/core/vendor/src/liblbfgs/autogen.sh +38 -0
  124. data/core/vendor/src/liblbfgs/config.guess +1411 -0
  125. data/core/vendor/src/liblbfgs/config.h.in +64 -0
  126. data/core/vendor/src/liblbfgs/config.sub +1500 -0
  127. data/core/vendor/src/liblbfgs/configure +21146 -0
  128. data/core/vendor/src/liblbfgs/configure.in +107 -0
  129. data/core/vendor/src/liblbfgs/depcomp +522 -0
  130. data/core/vendor/src/liblbfgs/include/lbfgs.h +745 -0
  131. data/core/vendor/src/liblbfgs/install-sh +322 -0
  132. data/core/vendor/src/liblbfgs/lbfgs.sln +26 -0
  133. data/core/vendor/src/liblbfgs/lib/Makefile.am +24 -0
  134. data/core/vendor/src/liblbfgs/lib/Makefile.in +499 -0
  135. data/core/vendor/src/liblbfgs/lib/arithmetic_ansi.h +133 -0
  136. data/core/vendor/src/liblbfgs/lib/arithmetic_sse_double.h +294 -0
  137. data/core/vendor/src/liblbfgs/lib/arithmetic_sse_float.h +298 -0
  138. data/core/vendor/src/liblbfgs/lib/lbfgs.c +1371 -0
  139. data/core/vendor/src/liblbfgs/lib/lib.vcxproj +95 -0
  140. data/core/vendor/src/liblbfgs/ltmain.sh +6426 -0
  141. data/core/vendor/src/liblbfgs/missing +353 -0
  142. data/core/vendor/src/liblbfgs/sample/Makefile.am +15 -0
  143. data/core/vendor/src/liblbfgs/sample/Makefile.in +433 -0
  144. data/core/vendor/src/liblbfgs/sample/sample.c +81 -0
  145. data/core/vendor/src/liblbfgs/sample/sample.cpp +126 -0
  146. data/core/vendor/src/liblbfgs/sample/sample.vcxproj +105 -0
  147. data/core/vendor/src/svm_light/LICENSE.txt +59 -0
  148. data/core/vendor/src/svm_light/Makefile +105 -0
  149. data/core/vendor/src/svm_light/kernel.h +40 -0
  150. data/core/vendor/src/svm_light/svm_classify.c +197 -0
  151. data/core/vendor/src/svm_light/svm_common.c +985 -0
  152. data/core/vendor/src/svm_light/svm_common.h +301 -0
  153. data/core/vendor/src/svm_light/svm_hideo.c +1062 -0
  154. data/core/vendor/src/svm_light/svm_learn.c +4147 -0
  155. data/core/vendor/src/svm_light/svm_learn.h +169 -0
  156. data/core/vendor/src/svm_light/svm_learn_main.c +397 -0
  157. data/core/vendor/src/svm_light/svm_loqo.c +211 -0
  158. data/ext/hack/Rakefile +17 -0
  159. data/ext/hack/support.rb +88 -0
  160. data/lib/opener/opinion_detector_basic.rb +91 -0
  161. data/lib/opener/opinion_detector_basic/public/markdown.css +284 -0
  162. data/lib/opener/opinion_detector_basic/server.rb +16 -0
  163. data/lib/opener/opinion_detector_basic/version.rb +5 -0
  164. data/lib/opener/opinion_detector_basic/views/index.erb +97 -0
  165. data/lib/opener/opinion_detector_basic/views/result.erb +15 -0
  166. data/opener-opinion-detector-basic.gemspec +36 -0
  167. data/pre_build_requirements.txt +1 -0
  168. metadata +309 -0
@@ -0,0 +1,2 @@
1
+ #include <crfsuite.hpp>
2
+
@@ -0,0 +1,32 @@
1
+ %module(directors="1") crfsuite
2
+
3
+ %{
4
+ #include "crfsuite_api.hpp"
5
+ %}
6
+
7
+ %include "std_string.i"
8
+ %include "std_vector.i"
9
+ %include "exception.i"
10
+
11
+ %template(Item) std::vector<CRFSuite::Attribute>;
12
+ %template(ItemSequence) std::vector<CRFSuite::Item>;
13
+ %template(StringList) std::vector<std::string>;
14
+
15
+ %feature("director") Trainer;
16
+
17
+ %exception {
18
+ try {
19
+ $action
20
+ } catch(const std::invalid_argument& e) {
21
+ SWIG_exception(SWIG_IOError, e.what());
22
+ } catch(const std::runtime_error& e) {
23
+ SWIG_exception(SWIG_RuntimeError, e.what());
24
+ } catch (const std::exception& e) {
25
+ SWIG_exception(SWIG_RuntimeError, e.what());
26
+ } catch(...) {
27
+ SWIG_exception(SWIG_RuntimeError,"Unknown exception");
28
+ }
29
+ }
30
+
31
+ %include "crfsuite_api.hpp"
32
+
@@ -0,0 +1,92 @@
1
+ CRFsuite Python module via SWIG
2
+
3
+ * HOW TO BUILD
4
+
5
+ 0. Build CRFsuite and install it (the library and include files are necessary)
6
+
7
+ 1. Generate a SWIG wrapper
8
+ $ ./prepare.sh --swig
9
+
10
+ 2. Build the binding.
11
+ $ python setup.py build_ext
12
+
13
+ 3. Install the binding.
14
+ $ python setup.py install
15
+
16
+ 4. Run the binding.
17
+ $ python
18
+ Python 2.6.6 (r266:84292, Sep 15 2010, 16:22:56)
19
+ [GCC 4.4.5] on linux2
20
+ Type "help", "copyright", "credits" or "license" for more information.
21
+ >>> import crfsuite
22
+ >>>
23
+
24
+
25
+ * SAMPLE PROGRAMS
26
+ Refer to sample_train.py and sample_test.py
27
+
28
+
29
+
30
+ * NOTES FOR INSTALLING CRFSUITE IN A NON-DEFAULT DIRECTORY
31
+
32
+ If you have changed the installation directory of CRFsuite using --prefix
33
+ option for the configure script, please specify the include and library
34
+ directories to setup.py; for example, if you have installed CRFsuite into
35
+ $HOME/local directory, run:
36
+
37
+ $ python setup.py build_ext --include-dir=$HOME/local/include --library-dirs=$HOME/local/lib
38
+
39
+ Be sure to set LD_LIBRARY_PATH so that the Python binding can find the shared
40
+ library of CRFsuite (crfsuite.so). For example,
41
+
42
+ $ export LD_LIBRARY_PATH=$HOME/local/lib
43
+
44
+ Otherwise, you will get this kind of an error:
45
+
46
+ $ python
47
+ Python 2.6.6 (r266:84292, Sep 15 2010, 16:22:56)
48
+ [GCC 4.4.5] on linux2
49
+ Type "help", "copyright", "credits" or "license" for more information.
50
+ >>> import crfsuite
51
+ Traceback (most recent call last):
52
+ File "<stdin>", line 1, in <module>
53
+ File "crfsuite.py", line 25, in <module>
54
+ _crfsuite = swig_import_helper()
55
+ File "crfsuite.py", line 21, in swig_import_helper
56
+ _mod = imp.load_module('_crfsuite', fp, pathname, description)
57
+ ImportError: libcrfsuite-0.12.so: cannot open shared object file: No such
58
+ file or directory
59
+
60
+
61
+
62
+ * NOTES FOR TESTING THE PYTHON MODULE WITHOUT INSTALLING IT
63
+
64
+ Adding "--inplace" option to the command-line argument of setup.py builds
65
+ _crfsuite.so in the current directory. If these files are placed on the
66
+ directory included in the module path of Python (e.g., the current directory
67
+ where a Python process is created), one can try the module without running
68
+ "python setup.py install"
69
+
70
+ $ python setup.py build_ext --inplace
71
+
72
+
73
+
74
+ * NOTES FOR GENERATING WRAPPER CODE USING SWIG.
75
+
76
+ The script "prepare.sh" can generate a SWIG wrapper with "--swig" option.
77
+ $ ./prepare.sh --swig
78
+
79
+ However, we may get a compiling error for the wrapper code (export_wrap.cpp)
80
+ even with the latest version of SWIG (2.0.4):
81
+
82
+ export_wrap.cpp:5019: error: redefinition of ?struct swig::traits<std::vector<
83
+ CRFSuite::Attribute, std::allocator<CRFSuite::Attribute> > >
84
+ export_wrap.cpp:4918: error: previous definition of ?struct swig::traits<std::
85
+ vector<CRFSuite::Attribute, std::allocator<CRFSuite::Attribute> > >
86
+ error: command 'g++' failed with exit status 1
87
+
88
+ Having no idea how to fix this problem elegantly, I simply remove the latter
89
+ definition from export_wrap.cpp manually. This is why I end up including
90
+ the wrapper code into the source repository.
91
+
92
+
@@ -0,0 +1,329 @@
1
+ # This file was automatically generated by SWIG (http://www.swig.org).
2
+ # Version 2.0.4
3
+ #
4
+ # Do not make changes to this file unless you know what you are doing--modify
5
+ # the SWIG interface file instead.
6
+
7
+
8
+
9
+ from sys import version_info
10
+ if version_info >= (2,6,0):
11
+ def swig_import_helper():
12
+ from os.path import dirname
13
+ import imp
14
+ fp = None
15
+ try:
16
+ fp, pathname, description = imp.find_module('_crfsuite', [dirname(__file__)])
17
+ except ImportError:
18
+ import _crfsuite
19
+ return _crfsuite
20
+ if fp is not None:
21
+ try:
22
+ _mod = imp.load_module('_crfsuite', fp, pathname, description)
23
+ finally:
24
+ fp.close()
25
+ return _mod
26
+ _crfsuite = swig_import_helper()
27
+ del swig_import_helper
28
+ else:
29
+ import _crfsuite
30
+ del version_info
31
+ try:
32
+ _swig_property = property
33
+ except NameError:
34
+ pass # Python < 2.2 doesn't have 'property'.
35
+ def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
36
+ if (name == "thisown"): return self.this.own(value)
37
+ if (name == "this"):
38
+ if type(value).__name__ == 'SwigPyObject':
39
+ self.__dict__[name] = value
40
+ return
41
+ method = class_type.__swig_setmethods__.get(name,None)
42
+ if method: return method(self,value)
43
+ if (not static):
44
+ self.__dict__[name] = value
45
+ else:
46
+ raise AttributeError("You cannot add attributes to %s" % self)
47
+
48
+ def _swig_setattr(self,class_type,name,value):
49
+ return _swig_setattr_nondynamic(self,class_type,name,value,0)
50
+
51
+ def _swig_getattr(self,class_type,name):
52
+ if (name == "thisown"): return self.this.own()
53
+ method = class_type.__swig_getmethods__.get(name,None)
54
+ if method: return method(self)
55
+ raise AttributeError(name)
56
+
57
+ def _swig_repr(self):
58
+ try: strthis = "proxy of " + self.this.__repr__()
59
+ except: strthis = ""
60
+ return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
61
+
62
+ try:
63
+ _object = object
64
+ _newclass = 1
65
+ except AttributeError:
66
+ class _object : pass
67
+ _newclass = 0
68
+
69
+
70
+ try:
71
+ import weakref
72
+ weakref_proxy = weakref.proxy
73
+ except:
74
+ weakref_proxy = lambda x: x
75
+
76
+
77
+ class SwigPyIterator(_object):
78
+ __swig_setmethods__ = {}
79
+ __setattr__ = lambda self, name, value: _swig_setattr(self, SwigPyIterator, name, value)
80
+ __swig_getmethods__ = {}
81
+ __getattr__ = lambda self, name: _swig_getattr(self, SwigPyIterator, name)
82
+ def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined - class is abstract")
83
+ __repr__ = _swig_repr
84
+ __swig_destroy__ = _crfsuite.delete_SwigPyIterator
85
+ __del__ = lambda self : None;
86
+ def value(self): return _crfsuite.SwigPyIterator_value(self)
87
+ def incr(self, n = 1): return _crfsuite.SwigPyIterator_incr(self, n)
88
+ def decr(self, n = 1): return _crfsuite.SwigPyIterator_decr(self, n)
89
+ def distance(self, *args): return _crfsuite.SwigPyIterator_distance(self, *args)
90
+ def equal(self, *args): return _crfsuite.SwigPyIterator_equal(self, *args)
91
+ def copy(self): return _crfsuite.SwigPyIterator_copy(self)
92
+ def next(self): return _crfsuite.SwigPyIterator_next(self)
93
+ def __next__(self): return _crfsuite.SwigPyIterator___next__(self)
94
+ def previous(self): return _crfsuite.SwigPyIterator_previous(self)
95
+ def advance(self, *args): return _crfsuite.SwigPyIterator_advance(self, *args)
96
+ def __eq__(self, *args): return _crfsuite.SwigPyIterator___eq__(self, *args)
97
+ def __ne__(self, *args): return _crfsuite.SwigPyIterator___ne__(self, *args)
98
+ def __iadd__(self, *args): return _crfsuite.SwigPyIterator___iadd__(self, *args)
99
+ def __isub__(self, *args): return _crfsuite.SwigPyIterator___isub__(self, *args)
100
+ def __add__(self, *args): return _crfsuite.SwigPyIterator___add__(self, *args)
101
+ def __sub__(self, *args): return _crfsuite.SwigPyIterator___sub__(self, *args)
102
+ def __iter__(self): return self
103
+ SwigPyIterator_swigregister = _crfsuite.SwigPyIterator_swigregister
104
+ SwigPyIterator_swigregister(SwigPyIterator)
105
+
106
+ class Item(_object):
107
+ __swig_setmethods__ = {}
108
+ __setattr__ = lambda self, name, value: _swig_setattr(self, Item, name, value)
109
+ __swig_getmethods__ = {}
110
+ __getattr__ = lambda self, name: _swig_getattr(self, Item, name)
111
+ __repr__ = _swig_repr
112
+ def iterator(self): return _crfsuite.Item_iterator(self)
113
+ def __iter__(self): return self.iterator()
114
+ def __nonzero__(self): return _crfsuite.Item___nonzero__(self)
115
+ def __bool__(self): return _crfsuite.Item___bool__(self)
116
+ def __len__(self): return _crfsuite.Item___len__(self)
117
+ def pop(self): return _crfsuite.Item_pop(self)
118
+ def __getslice__(self, *args): return _crfsuite.Item___getslice__(self, *args)
119
+ def __setslice__(self, *args): return _crfsuite.Item___setslice__(self, *args)
120
+ def __delslice__(self, *args): return _crfsuite.Item___delslice__(self, *args)
121
+ def __delitem__(self, *args): return _crfsuite.Item___delitem__(self, *args)
122
+ def __getitem__(self, *args): return _crfsuite.Item___getitem__(self, *args)
123
+ def __setitem__(self, *args): return _crfsuite.Item___setitem__(self, *args)
124
+ def append(self, *args): return _crfsuite.Item_append(self, *args)
125
+ def empty(self): return _crfsuite.Item_empty(self)
126
+ def size(self): return _crfsuite.Item_size(self)
127
+ def clear(self): return _crfsuite.Item_clear(self)
128
+ def swap(self, *args): return _crfsuite.Item_swap(self, *args)
129
+ def get_allocator(self): return _crfsuite.Item_get_allocator(self)
130
+ def begin(self): return _crfsuite.Item_begin(self)
131
+ def end(self): return _crfsuite.Item_end(self)
132
+ def rbegin(self): return _crfsuite.Item_rbegin(self)
133
+ def rend(self): return _crfsuite.Item_rend(self)
134
+ def pop_back(self): return _crfsuite.Item_pop_back(self)
135
+ def erase(self, *args): return _crfsuite.Item_erase(self, *args)
136
+ def __init__(self, *args):
137
+ this = _crfsuite.new_Item(*args)
138
+ try: self.this.append(this)
139
+ except: self.this = this
140
+ def push_back(self, *args): return _crfsuite.Item_push_back(self, *args)
141
+ def front(self): return _crfsuite.Item_front(self)
142
+ def back(self): return _crfsuite.Item_back(self)
143
+ def assign(self, *args): return _crfsuite.Item_assign(self, *args)
144
+ def resize(self, *args): return _crfsuite.Item_resize(self, *args)
145
+ def insert(self, *args): return _crfsuite.Item_insert(self, *args)
146
+ def reserve(self, *args): return _crfsuite.Item_reserve(self, *args)
147
+ def capacity(self): return _crfsuite.Item_capacity(self)
148
+ __swig_destroy__ = _crfsuite.delete_Item
149
+ __del__ = lambda self : None;
150
+ Item_swigregister = _crfsuite.Item_swigregister
151
+ Item_swigregister(Item)
152
+
153
+ class ItemSequence(_object):
154
+ __swig_setmethods__ = {}
155
+ __setattr__ = lambda self, name, value: _swig_setattr(self, ItemSequence, name, value)
156
+ __swig_getmethods__ = {}
157
+ __getattr__ = lambda self, name: _swig_getattr(self, ItemSequence, name)
158
+ __repr__ = _swig_repr
159
+ def iterator(self): return _crfsuite.ItemSequence_iterator(self)
160
+ def __iter__(self): return self.iterator()
161
+ def __nonzero__(self): return _crfsuite.ItemSequence___nonzero__(self)
162
+ def __bool__(self): return _crfsuite.ItemSequence___bool__(self)
163
+ def __len__(self): return _crfsuite.ItemSequence___len__(self)
164
+ def pop(self): return _crfsuite.ItemSequence_pop(self)
165
+ def __getslice__(self, *args): return _crfsuite.ItemSequence___getslice__(self, *args)
166
+ def __setslice__(self, *args): return _crfsuite.ItemSequence___setslice__(self, *args)
167
+ def __delslice__(self, *args): return _crfsuite.ItemSequence___delslice__(self, *args)
168
+ def __delitem__(self, *args): return _crfsuite.ItemSequence___delitem__(self, *args)
169
+ def __getitem__(self, *args): return _crfsuite.ItemSequence___getitem__(self, *args)
170
+ def __setitem__(self, *args): return _crfsuite.ItemSequence___setitem__(self, *args)
171
+ def append(self, *args): return _crfsuite.ItemSequence_append(self, *args)
172
+ def empty(self): return _crfsuite.ItemSequence_empty(self)
173
+ def size(self): return _crfsuite.ItemSequence_size(self)
174
+ def clear(self): return _crfsuite.ItemSequence_clear(self)
175
+ def swap(self, *args): return _crfsuite.ItemSequence_swap(self, *args)
176
+ def get_allocator(self): return _crfsuite.ItemSequence_get_allocator(self)
177
+ def begin(self): return _crfsuite.ItemSequence_begin(self)
178
+ def end(self): return _crfsuite.ItemSequence_end(self)
179
+ def rbegin(self): return _crfsuite.ItemSequence_rbegin(self)
180
+ def rend(self): return _crfsuite.ItemSequence_rend(self)
181
+ def pop_back(self): return _crfsuite.ItemSequence_pop_back(self)
182
+ def erase(self, *args): return _crfsuite.ItemSequence_erase(self, *args)
183
+ def __init__(self, *args):
184
+ this = _crfsuite.new_ItemSequence(*args)
185
+ try: self.this.append(this)
186
+ except: self.this = this
187
+ def push_back(self, *args): return _crfsuite.ItemSequence_push_back(self, *args)
188
+ def front(self): return _crfsuite.ItemSequence_front(self)
189
+ def back(self): return _crfsuite.ItemSequence_back(self)
190
+ def assign(self, *args): return _crfsuite.ItemSequence_assign(self, *args)
191
+ def resize(self, *args): return _crfsuite.ItemSequence_resize(self, *args)
192
+ def insert(self, *args): return _crfsuite.ItemSequence_insert(self, *args)
193
+ def reserve(self, *args): return _crfsuite.ItemSequence_reserve(self, *args)
194
+ def capacity(self): return _crfsuite.ItemSequence_capacity(self)
195
+ __swig_destroy__ = _crfsuite.delete_ItemSequence
196
+ __del__ = lambda self : None;
197
+ ItemSequence_swigregister = _crfsuite.ItemSequence_swigregister
198
+ ItemSequence_swigregister(ItemSequence)
199
+
200
+ class StringList(_object):
201
+ __swig_setmethods__ = {}
202
+ __setattr__ = lambda self, name, value: _swig_setattr(self, StringList, name, value)
203
+ __swig_getmethods__ = {}
204
+ __getattr__ = lambda self, name: _swig_getattr(self, StringList, name)
205
+ __repr__ = _swig_repr
206
+ def iterator(self): return _crfsuite.StringList_iterator(self)
207
+ def __iter__(self): return self.iterator()
208
+ def __nonzero__(self): return _crfsuite.StringList___nonzero__(self)
209
+ def __bool__(self): return _crfsuite.StringList___bool__(self)
210
+ def __len__(self): return _crfsuite.StringList___len__(self)
211
+ def pop(self): return _crfsuite.StringList_pop(self)
212
+ def __getslice__(self, *args): return _crfsuite.StringList___getslice__(self, *args)
213
+ def __setslice__(self, *args): return _crfsuite.StringList___setslice__(self, *args)
214
+ def __delslice__(self, *args): return _crfsuite.StringList___delslice__(self, *args)
215
+ def __delitem__(self, *args): return _crfsuite.StringList___delitem__(self, *args)
216
+ def __getitem__(self, *args): return _crfsuite.StringList___getitem__(self, *args)
217
+ def __setitem__(self, *args): return _crfsuite.StringList___setitem__(self, *args)
218
+ def append(self, *args): return _crfsuite.StringList_append(self, *args)
219
+ def empty(self): return _crfsuite.StringList_empty(self)
220
+ def size(self): return _crfsuite.StringList_size(self)
221
+ def clear(self): return _crfsuite.StringList_clear(self)
222
+ def swap(self, *args): return _crfsuite.StringList_swap(self, *args)
223
+ def get_allocator(self): return _crfsuite.StringList_get_allocator(self)
224
+ def begin(self): return _crfsuite.StringList_begin(self)
225
+ def end(self): return _crfsuite.StringList_end(self)
226
+ def rbegin(self): return _crfsuite.StringList_rbegin(self)
227
+ def rend(self): return _crfsuite.StringList_rend(self)
228
+ def pop_back(self): return _crfsuite.StringList_pop_back(self)
229
+ def erase(self, *args): return _crfsuite.StringList_erase(self, *args)
230
+ def __init__(self, *args):
231
+ this = _crfsuite.new_StringList(*args)
232
+ try: self.this.append(this)
233
+ except: self.this = this
234
+ def push_back(self, *args): return _crfsuite.StringList_push_back(self, *args)
235
+ def front(self): return _crfsuite.StringList_front(self)
236
+ def back(self): return _crfsuite.StringList_back(self)
237
+ def assign(self, *args): return _crfsuite.StringList_assign(self, *args)
238
+ def resize(self, *args): return _crfsuite.StringList_resize(self, *args)
239
+ def insert(self, *args): return _crfsuite.StringList_insert(self, *args)
240
+ def reserve(self, *args): return _crfsuite.StringList_reserve(self, *args)
241
+ def capacity(self): return _crfsuite.StringList_capacity(self)
242
+ __swig_destroy__ = _crfsuite.delete_StringList
243
+ __del__ = lambda self : None;
244
+ StringList_swigregister = _crfsuite.StringList_swigregister
245
+ StringList_swigregister(StringList)
246
+
247
+ class Attribute(_object):
248
+ __swig_setmethods__ = {}
249
+ __setattr__ = lambda self, name, value: _swig_setattr(self, Attribute, name, value)
250
+ __swig_getmethods__ = {}
251
+ __getattr__ = lambda self, name: _swig_getattr(self, Attribute, name)
252
+ __repr__ = _swig_repr
253
+ __swig_setmethods__["attr"] = _crfsuite.Attribute_attr_set
254
+ __swig_getmethods__["attr"] = _crfsuite.Attribute_attr_get
255
+ if _newclass:attr = _swig_property(_crfsuite.Attribute_attr_get, _crfsuite.Attribute_attr_set)
256
+ __swig_setmethods__["value"] = _crfsuite.Attribute_value_set
257
+ __swig_getmethods__["value"] = _crfsuite.Attribute_value_get
258
+ if _newclass:value = _swig_property(_crfsuite.Attribute_value_get, _crfsuite.Attribute_value_set)
259
+ def __init__(self, *args):
260
+ this = _crfsuite.new_Attribute(*args)
261
+ try: self.this.append(this)
262
+ except: self.this = this
263
+ __swig_destroy__ = _crfsuite.delete_Attribute
264
+ __del__ = lambda self : None;
265
+ Attribute_swigregister = _crfsuite.Attribute_swigregister
266
+ Attribute_swigregister(Attribute)
267
+
268
+ class Trainer(_object):
269
+ __swig_setmethods__ = {}
270
+ __setattr__ = lambda self, name, value: _swig_setattr(self, Trainer, name, value)
271
+ __swig_getmethods__ = {}
272
+ __getattr__ = lambda self, name: _swig_getattr(self, Trainer, name)
273
+ __repr__ = _swig_repr
274
+ def __init__(self):
275
+ if self.__class__ == Trainer:
276
+ _self = None
277
+ else:
278
+ _self = self
279
+ this = _crfsuite.new_Trainer(_self, )
280
+ try: self.this.append(this)
281
+ except: self.this = this
282
+ __swig_destroy__ = _crfsuite.delete_Trainer
283
+ __del__ = lambda self : None;
284
+ def clear(self): return _crfsuite.Trainer_clear(self)
285
+ def append(self, *args): return _crfsuite.Trainer_append(self, *args)
286
+ def select(self, *args): return _crfsuite.Trainer_select(self, *args)
287
+ def train(self, *args): return _crfsuite.Trainer_train(self, *args)
288
+ def params(self): return _crfsuite.Trainer_params(self)
289
+ def set(self, *args): return _crfsuite.Trainer_set(self, *args)
290
+ def get(self, *args): return _crfsuite.Trainer_get(self, *args)
291
+ def help(self, *args): return _crfsuite.Trainer_help(self, *args)
292
+ def message(self, *args): return _crfsuite.Trainer_message(self, *args)
293
+ def __disown__(self):
294
+ self.this.disown()
295
+ _crfsuite.disown_Trainer(self)
296
+ return weakref_proxy(self)
297
+ Trainer_swigregister = _crfsuite.Trainer_swigregister
298
+ Trainer_swigregister(Trainer)
299
+
300
+ class Tagger(_object):
301
+ __swig_setmethods__ = {}
302
+ __setattr__ = lambda self, name, value: _swig_setattr(self, Tagger, name, value)
303
+ __swig_getmethods__ = {}
304
+ __getattr__ = lambda self, name: _swig_getattr(self, Tagger, name)
305
+ __repr__ = _swig_repr
306
+ def __init__(self):
307
+ this = _crfsuite.new_Tagger()
308
+ try: self.this.append(this)
309
+ except: self.this = this
310
+ __swig_destroy__ = _crfsuite.delete_Tagger
311
+ __del__ = lambda self : None;
312
+ def open(self, *args): return _crfsuite.Tagger_open(self, *args)
313
+ def close(self): return _crfsuite.Tagger_close(self)
314
+ def labels(self): return _crfsuite.Tagger_labels(self)
315
+ def tag(self, *args): return _crfsuite.Tagger_tag(self, *args)
316
+ def set(self, *args): return _crfsuite.Tagger_set(self, *args)
317
+ def viterbi(self): return _crfsuite.Tagger_viterbi(self)
318
+ def probability(self, *args): return _crfsuite.Tagger_probability(self, *args)
319
+ def marginal(self, *args): return _crfsuite.Tagger_marginal(self, *args)
320
+ Tagger_swigregister = _crfsuite.Tagger_swigregister
321
+ Tagger_swigregister(Tagger)
322
+
323
+
324
+ def version():
325
+ return _crfsuite.version()
326
+ version = _crfsuite.version
327
+ # This file is compatible with both classic and new-style classes.
328
+
329
+