opener-opinion-detector-basic 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (148) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -0
  3. data/ext/hack/Rakefile +0 -2
  4. data/lib/opener/opinion_detector_basic/version.rb +1 -1
  5. data/opener-opinion-detector-basic.gemspec +0 -1
  6. data/task/compile.rake +1 -1
  7. data/task/requirements.rake +0 -1
  8. metadata +2 -142
  9. data/core/vendor/src/crfsuite/AUTHORS +0 -1
  10. data/core/vendor/src/crfsuite/COPYING +0 -27
  11. data/core/vendor/src/crfsuite/ChangeLog +0 -103
  12. data/core/vendor/src/crfsuite/INSTALL +0 -236
  13. data/core/vendor/src/crfsuite/Makefile.am +0 -19
  14. data/core/vendor/src/crfsuite/Makefile.in +0 -783
  15. data/core/vendor/src/crfsuite/README +0 -183
  16. data/core/vendor/src/crfsuite/aclocal.m4 +0 -9018
  17. data/core/vendor/src/crfsuite/autogen.sh +0 -38
  18. data/core/vendor/src/crfsuite/compile +0 -143
  19. data/core/vendor/src/crfsuite/config.guess +0 -1502
  20. data/core/vendor/src/crfsuite/config.h.in +0 -198
  21. data/core/vendor/src/crfsuite/config.sub +0 -1714
  22. data/core/vendor/src/crfsuite/configure +0 -14273
  23. data/core/vendor/src/crfsuite/configure.in +0 -149
  24. data/core/vendor/src/crfsuite/crfsuite.sln +0 -42
  25. data/core/vendor/src/crfsuite/depcomp +0 -630
  26. data/core/vendor/src/crfsuite/example/chunking.py +0 -49
  27. data/core/vendor/src/crfsuite/example/crfutils.py +0 -179
  28. data/core/vendor/src/crfsuite/example/ner.py +0 -270
  29. data/core/vendor/src/crfsuite/example/pos.py +0 -78
  30. data/core/vendor/src/crfsuite/example/template.py +0 -88
  31. data/core/vendor/src/crfsuite/frontend/Makefile.am +0 -29
  32. data/core/vendor/src/crfsuite/frontend/Makefile.in +0 -640
  33. data/core/vendor/src/crfsuite/frontend/dump.c +0 -116
  34. data/core/vendor/src/crfsuite/frontend/frontend.vcxproj +0 -129
  35. data/core/vendor/src/crfsuite/frontend/iwa.c +0 -273
  36. data/core/vendor/src/crfsuite/frontend/iwa.h +0 -65
  37. data/core/vendor/src/crfsuite/frontend/learn.c +0 -439
  38. data/core/vendor/src/crfsuite/frontend/main.c +0 -137
  39. data/core/vendor/src/crfsuite/frontend/option.c +0 -93
  40. data/core/vendor/src/crfsuite/frontend/option.h +0 -86
  41. data/core/vendor/src/crfsuite/frontend/readdata.h +0 -38
  42. data/core/vendor/src/crfsuite/frontend/reader.c +0 -136
  43. data/core/vendor/src/crfsuite/frontend/tag.c +0 -427
  44. data/core/vendor/src/crfsuite/genbinary.sh.in +0 -15
  45. data/core/vendor/src/crfsuite/include/Makefile.am +0 -11
  46. data/core/vendor/src/crfsuite/include/Makefile.in +0 -461
  47. data/core/vendor/src/crfsuite/include/crfsuite.h +0 -1063
  48. data/core/vendor/src/crfsuite/include/crfsuite.hpp +0 -555
  49. data/core/vendor/src/crfsuite/include/crfsuite_api.hpp +0 -400
  50. data/core/vendor/src/crfsuite/include/os.h +0 -61
  51. data/core/vendor/src/crfsuite/install-sh +0 -520
  52. data/core/vendor/src/crfsuite/lib/cqdb/COPYING +0 -28
  53. data/core/vendor/src/crfsuite/lib/cqdb/Makefile.am +0 -21
  54. data/core/vendor/src/crfsuite/lib/cqdb/Makefile.in +0 -549
  55. data/core/vendor/src/crfsuite/lib/cqdb/cqdb.vcxproj +0 -86
  56. data/core/vendor/src/crfsuite/lib/cqdb/include/cqdb.h +0 -524
  57. data/core/vendor/src/crfsuite/lib/cqdb/src/cqdb.c +0 -587
  58. data/core/vendor/src/crfsuite/lib/cqdb/src/lookup3.c +0 -976
  59. data/core/vendor/src/crfsuite/lib/crf/Makefile.am +0 -46
  60. data/core/vendor/src/crfsuite/lib/crf/Makefile.in +0 -721
  61. data/core/vendor/src/crfsuite/lib/crf/crf.vcxproj +0 -216
  62. data/core/vendor/src/crfsuite/lib/crf/src/crf1d.h +0 -353
  63. data/core/vendor/src/crfsuite/lib/crf/src/crf1d_context.c +0 -705
  64. data/core/vendor/src/crfsuite/lib/crf/src/crf1d_encode.c +0 -943
  65. data/core/vendor/src/crfsuite/lib/crf/src/crf1d_feature.c +0 -352
  66. data/core/vendor/src/crfsuite/lib/crf/src/crf1d_model.c +0 -994
  67. data/core/vendor/src/crfsuite/lib/crf/src/crf1d_tag.c +0 -550
  68. data/core/vendor/src/crfsuite/lib/crf/src/crfsuite.c +0 -492
  69. data/core/vendor/src/crfsuite/lib/crf/src/crfsuite_internal.h +0 -236
  70. data/core/vendor/src/crfsuite/lib/crf/src/crfsuite_train.c +0 -272
  71. data/core/vendor/src/crfsuite/lib/crf/src/dataset.c +0 -106
  72. data/core/vendor/src/crfsuite/lib/crf/src/dictionary.c +0 -118
  73. data/core/vendor/src/crfsuite/lib/crf/src/holdout.c +0 -80
  74. data/core/vendor/src/crfsuite/lib/crf/src/logging.c +0 -91
  75. data/core/vendor/src/crfsuite/lib/crf/src/logging.h +0 -48
  76. data/core/vendor/src/crfsuite/lib/crf/src/params.c +0 -335
  77. data/core/vendor/src/crfsuite/lib/crf/src/params.h +0 -80
  78. data/core/vendor/src/crfsuite/lib/crf/src/quark.c +0 -172
  79. data/core/vendor/src/crfsuite/lib/crf/src/quark.h +0 -46
  80. data/core/vendor/src/crfsuite/lib/crf/src/rumavl.c +0 -1107
  81. data/core/vendor/src/crfsuite/lib/crf/src/rumavl.h +0 -160
  82. data/core/vendor/src/crfsuite/lib/crf/src/train_arow.c +0 -408
  83. data/core/vendor/src/crfsuite/lib/crf/src/train_averaged_perceptron.c +0 -242
  84. data/core/vendor/src/crfsuite/lib/crf/src/train_l2sgd.c +0 -507
  85. data/core/vendor/src/crfsuite/lib/crf/src/train_lbfgs.c +0 -338
  86. data/core/vendor/src/crfsuite/lib/crf/src/train_passive_aggressive.c +0 -435
  87. data/core/vendor/src/crfsuite/lib/crf/src/vecmath.h +0 -341
  88. data/core/vendor/src/crfsuite/ltmain.sh +0 -8413
  89. data/core/vendor/src/crfsuite/missing +0 -376
  90. data/core/vendor/src/crfsuite/swig/Makefile.am +0 -13
  91. data/core/vendor/src/crfsuite/swig/Makefile.in +0 -365
  92. data/core/vendor/src/crfsuite/swig/crfsuite.cpp +0 -2
  93. data/core/vendor/src/crfsuite/swig/export.i +0 -32
  94. data/core/vendor/src/crfsuite/swig/python/README +0 -92
  95. data/core/vendor/src/crfsuite/swig/python/crfsuite.py +0 -329
  96. data/core/vendor/src/crfsuite/swig/python/export_wrap.cpp +0 -14355
  97. data/core/vendor/src/crfsuite/swig/python/export_wrap.h +0 -63
  98. data/core/vendor/src/crfsuite/swig/python/prepare.sh +0 -9
  99. data/core/vendor/src/crfsuite/swig/python/sample_tag.py +0 -52
  100. data/core/vendor/src/crfsuite/swig/python/sample_train.py +0 -68
  101. data/core/vendor/src/crfsuite/swig/python/setup.py +0 -44
  102. data/core/vendor/src/crfsuite/win32/stdint.h +0 -679
  103. data/core/vendor/src/liblbfgs/AUTHORS +0 -1
  104. data/core/vendor/src/liblbfgs/COPYING +0 -22
  105. data/core/vendor/src/liblbfgs/ChangeLog +0 -120
  106. data/core/vendor/src/liblbfgs/INSTALL +0 -231
  107. data/core/vendor/src/liblbfgs/Makefile.am +0 -10
  108. data/core/vendor/src/liblbfgs/Makefile.in +0 -638
  109. data/core/vendor/src/liblbfgs/NEWS +0 -0
  110. data/core/vendor/src/liblbfgs/README +0 -71
  111. data/core/vendor/src/liblbfgs/aclocal.m4 +0 -6985
  112. data/core/vendor/src/liblbfgs/autogen.sh +0 -38
  113. data/core/vendor/src/liblbfgs/config.guess +0 -1411
  114. data/core/vendor/src/liblbfgs/config.h.in +0 -64
  115. data/core/vendor/src/liblbfgs/config.sub +0 -1500
  116. data/core/vendor/src/liblbfgs/configure +0 -21146
  117. data/core/vendor/src/liblbfgs/configure.in +0 -107
  118. data/core/vendor/src/liblbfgs/depcomp +0 -522
  119. data/core/vendor/src/liblbfgs/include/lbfgs.h +0 -745
  120. data/core/vendor/src/liblbfgs/install-sh +0 -322
  121. data/core/vendor/src/liblbfgs/lbfgs.sln +0 -26
  122. data/core/vendor/src/liblbfgs/lib/Makefile.am +0 -24
  123. data/core/vendor/src/liblbfgs/lib/Makefile.in +0 -499
  124. data/core/vendor/src/liblbfgs/lib/arithmetic_ansi.h +0 -133
  125. data/core/vendor/src/liblbfgs/lib/arithmetic_sse_double.h +0 -294
  126. data/core/vendor/src/liblbfgs/lib/arithmetic_sse_float.h +0 -298
  127. data/core/vendor/src/liblbfgs/lib/lbfgs.c +0 -1371
  128. data/core/vendor/src/liblbfgs/lib/lib.vcxproj +0 -95
  129. data/core/vendor/src/liblbfgs/ltmain.sh +0 -6426
  130. data/core/vendor/src/liblbfgs/missing +0 -353
  131. data/core/vendor/src/liblbfgs/sample/Makefile.am +0 -15
  132. data/core/vendor/src/liblbfgs/sample/Makefile.in +0 -433
  133. data/core/vendor/src/liblbfgs/sample/sample.c +0 -81
  134. data/core/vendor/src/liblbfgs/sample/sample.cpp +0 -126
  135. data/core/vendor/src/liblbfgs/sample/sample.vcxproj +0 -105
  136. data/core/vendor/src/svm_light/LICENSE.txt +0 -59
  137. data/core/vendor/src/svm_light/Makefile +0 -105
  138. data/core/vendor/src/svm_light/kernel.h +0 -40
  139. data/core/vendor/src/svm_light/svm_classify.c +0 -197
  140. data/core/vendor/src/svm_light/svm_common.c +0 -985
  141. data/core/vendor/src/svm_light/svm_common.h +0 -301
  142. data/core/vendor/src/svm_light/svm_hideo.c +0 -1062
  143. data/core/vendor/src/svm_light/svm_learn.c +0 -4147
  144. data/core/vendor/src/svm_light/svm_learn.h +0 -169
  145. data/core/vendor/src/svm_light/svm_learn_main.c +0 -397
  146. data/core/vendor/src/svm_light/svm_loqo.c +0 -211
  147. data/task/c.rake +0 -36
  148. data/task/submodules.rake +0 -5
@@ -1,63 +0,0 @@
1
- /* ----------------------------------------------------------------------------
2
- * This file was automatically generated by SWIG (http://www.swig.org).
3
- * Version 2.0.4
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
- #ifndef SWIG_crfsuite_WRAP_H_
12
- #define SWIG_crfsuite_WRAP_H_
13
-
14
- #include <map>
15
- #include <string>
16
-
17
-
18
- class SwigDirector_Trainer : public CRFSuite::Trainer, public Swig::Director {
19
-
20
- public:
21
- SwigDirector_Trainer(PyObject *self);
22
- virtual ~SwigDirector_Trainer();
23
- virtual void message(std::string const &msg);
24
-
25
-
26
- /* Internal Director utilities */
27
- public:
28
- bool swig_get_inner(const char* swig_protected_method_name) const {
29
- std::map<std::string, bool>::const_iterator iv = swig_inner.find(swig_protected_method_name);
30
- return (iv != swig_inner.end() ? iv->second : false);
31
- }
32
-
33
- void swig_set_inner(const char* swig_protected_method_name, bool val) const
34
- { swig_inner[swig_protected_method_name] = val;}
35
-
36
- private:
37
- mutable std::map<std::string, bool> swig_inner;
38
-
39
-
40
- #if defined(SWIG_PYTHON_DIRECTOR_VTABLE)
41
- /* VTable implementation */
42
- PyObject *swig_get_method(size_t method_index, const char *method_name) const {
43
- PyObject *method = vtable[method_index];
44
- if (!method) {
45
- swig::SwigVar_PyObject name = SWIG_Python_str_FromChar(method_name);
46
- method = PyObject_GetAttr(swig_get_self(), name);
47
- if (!method) {
48
- std::string msg = "Method in class Trainer doesn't exist, undefined ";
49
- msg += method_name;
50
- Swig::DirectorMethodException::raise(msg.c_str());
51
- }
52
- vtable[method_index] = method;
53
- };
54
- return method;
55
- }
56
- private:
57
- mutable swig::SwigVar_PyObject vtable[1];
58
- #endif
59
-
60
- };
61
-
62
-
63
- #endif
@@ -1,9 +0,0 @@
1
- #!/bin/sh
2
-
3
- ln -s ../crfsuite.cpp
4
- ln -s ../export.i
5
-
6
- if [ "$1" = "--swig" ];
7
- then
8
- swig -c++ -python -I../../include -o export_wrap.cpp export.i
9
- fi
@@ -1,52 +0,0 @@
1
- #!/usr/bin/env python
2
-
3
- import crfsuite
4
- import sys
5
-
6
- def instances(fi):
7
- xseq = crfsuite.ItemSequence()
8
-
9
- for line in fi:
10
- line = line.strip('\n')
11
- if not line:
12
- # An empty line presents an end of a sequence.
13
- yield xseq
14
- xseq = crfsuite.ItemSequence()
15
- continue
16
-
17
- # Split the line with TAB characters.
18
- fields = line.split('\t')
19
- item = crfsuite.Item()
20
- for field in fields[1:]:
21
- p = field.rfind(':')
22
- if p == -1:
23
- # Unweighted (weight=1) attribute.
24
- item.append(crfsuite.Attribute(field))
25
- else:
26
- # Weighted attribute
27
- item.append(crfsuite.Attribute(field[:p], float(field[p+1:])))
28
-
29
- # Append the item to the item sequence.
30
- xseq.append(item)
31
-
32
- if __name__ == '__main__':
33
- fi = sys.stdin
34
- fo = sys.stdout
35
-
36
- # Create a tagger object.
37
- tagger = crfsuite.Tagger()
38
-
39
- # Load the model to the tagger.
40
- tagger.open(sys.argv[1])
41
-
42
- for xseq in instances(fi):
43
- # Tag the sequence.
44
- tagger.set(xseq)
45
- # Obtain the label sequence predicted by the tagger.
46
- yseq = tagger.viterbi()
47
- # Output the probability of the predicted label sequence.
48
- print tagger.probability(yseq)
49
- for t, y in enumerate(yseq):
50
- # Output the predicted labels with their marginal probabilities.
51
- print '%s:%f' % (y, tagger.marginal(y, t))
52
- print
@@ -1,68 +0,0 @@
1
- #!/usr/bin/env python
2
-
3
- import crfsuite
4
- import sys
5
-
6
- # Inherit crfsuite.Trainer to implement message() function, which receives
7
- # progress messages from a training process.
8
- class Trainer(crfsuite.Trainer):
9
- def message(self, s):
10
- # Simply output the progress messages to STDOUT.
11
- sys.stdout.write(s)
12
-
13
- def instances(fi):
14
- xseq = crfsuite.ItemSequence()
15
- yseq = crfsuite.StringList()
16
-
17
- for line in fi:
18
- line = line.strip('\n')
19
- if not line:
20
- # An empty line presents an end of a sequence.
21
- yield xseq, tuple(yseq)
22
- xseq = crfsuite.ItemSequence()
23
- yseq = crfsuite.StringList()
24
- continue
25
-
26
- # Split the line with TAB characters.
27
- fields = line.split('\t')
28
-
29
- # Append attributes to the item.
30
- item = crfsuite.Item()
31
- for field in fields[1:]:
32
- p = field.rfind(':')
33
- if p == -1:
34
- # Unweighted (weight=1) attribute.
35
- item.append(crfsuite.Attribute(field))
36
- else:
37
- # Weighted attribute
38
- item.append(crfsuite.Attribute(field[:p], float(field[p+1:])))
39
-
40
- # Append the item to the item sequence.
41
- xseq.append(item)
42
- # Append the label to the label sequence.
43
- yseq.append(fields[0])
44
-
45
- if __name__ == '__main__':
46
- # This demonstrates how to obtain the version string of CRFsuite.
47
- print crfsuite.version()
48
-
49
- # Create a Trainer object.
50
- trainer = Trainer()
51
-
52
- # Read training instances from STDIN, and set them to trainer.
53
- for xseq, yseq in instances(sys.stdin):
54
- trainer.append(xseq, yseq, 0)
55
-
56
- # Use L2-regularized SGD and 1st-order dyad features.
57
- trainer.select('l2sgd', 'crf1d')
58
-
59
- # This demonstrates how to list parameters and obtain their values.
60
- for name in trainer.params():
61
- print name, trainer.get(name), trainer.help(name)
62
-
63
- # Set the coefficient for L2 regularization to 0.1
64
- trainer.set('c2', '0.1')
65
-
66
- # Start training; the training process will invoke trainer.message()
67
- # to report the progress.
68
- trainer.train(sys.argv[1], -1)
@@ -1,44 +0,0 @@
1
- #!/usr/bin/env python
2
-
3
- """
4
- setup.py file for SWIG example
5
- """
6
-
7
- import sys
8
- import os.path
9
-
10
- def get_rootdir():
11
- return '/home/users/okazaki/local'
12
- def get_includedir():
13
- return os.path.join(get_rootdir(), 'include')
14
- def get_librarydir():
15
- return os.path.join(get_rootdir(), 'lib')
16
-
17
- import os; os.environ['CC'] = 'g++'; os.environ['CXX'] = 'g++';
18
- os.environ['CPP'] = 'g++'; os.environ['LDSHARED'] = 'g++'
19
-
20
- from distutils.core import setup, Extension
21
-
22
- crfsuite_module = Extension(
23
- '_crfsuite',
24
- sources = [
25
- 'crfsuite.cpp',
26
- 'export_wrap.cpp',
27
- ],
28
- # include_dirs=['../../include',],
29
- extra_link_args=['-shared'],
30
- # library_dirs=['../../lib/crf',],
31
- libraries=['crfsuite'],
32
- # extra_objects=['../../lib/crf/libcrfsuite.la'],
33
- language='c++',
34
- )
35
-
36
- setup(
37
- name = '@PACKAGE@',
38
- version = '@VERSION@',
39
- author = 'Naoaki Okazaki',
40
- description = """CRFSuite Python module""",
41
- ext_modules = [crfsuite_module],
42
- py_modules = ["crfsuite"],
43
- )
44
-