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,216 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
- <ItemGroup Label="ProjectConfigurations">
4
- <ProjectConfiguration Include="Debug|Win32">
5
- <Configuration>Debug</Configuration>
6
- <Platform>Win32</Platform>
7
- </ProjectConfiguration>
8
- <ProjectConfiguration Include="Debug|x64">
9
- <Configuration>Debug</Configuration>
10
- <Platform>x64</Platform>
11
- </ProjectConfiguration>
12
- <ProjectConfiguration Include="Release|Win32">
13
- <Configuration>Release</Configuration>
14
- <Platform>Win32</Platform>
15
- </ProjectConfiguration>
16
- <ProjectConfiguration Include="Release|x64">
17
- <Configuration>Release</Configuration>
18
- <Platform>x64</Platform>
19
- </ProjectConfiguration>
20
- </ItemGroup>
21
- <PropertyGroup Label="Globals">
22
- <ProjectGuid>{D6B16F2E-DA86-4591-8B50-348AB7E3432E}</ProjectGuid>
23
- <RootNamespace>crf</RootNamespace>
24
- <Keyword>Win32Proj</Keyword>
25
- </PropertyGroup>
26
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
27
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
28
- <ConfigurationType>StaticLibrary</ConfigurationType>
29
- <CharacterSet>Unicode</CharacterSet>
30
- <WholeProgramOptimization>true</WholeProgramOptimization>
31
- </PropertyGroup>
32
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
33
- <ConfigurationType>StaticLibrary</ConfigurationType>
34
- <CharacterSet>Unicode</CharacterSet>
35
- <WholeProgramOptimization>true</WholeProgramOptimization>
36
- </PropertyGroup>
37
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
38
- <ConfigurationType>StaticLibrary</ConfigurationType>
39
- <CharacterSet>Unicode</CharacterSet>
40
- </PropertyGroup>
41
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
42
- <ConfigurationType>StaticLibrary</ConfigurationType>
43
- <CharacterSet>Unicode</CharacterSet>
44
- </PropertyGroup>
45
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
46
- <ImportGroup Label="ExtensionSettings">
47
- </ImportGroup>
48
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
49
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
50
- </ImportGroup>
51
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
52
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
53
- </ImportGroup>
54
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
55
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
56
- </ImportGroup>
57
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
58
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
59
- </ImportGroup>
60
- <PropertyGroup Label="UserMacros" />
61
- <PropertyGroup>
62
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
63
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
64
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)\</OutDir>
65
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
66
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)\</IntDir>
67
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
68
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)\</OutDir>
69
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
70
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)\</IntDir>
71
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
72
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
73
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
74
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
75
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
76
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
77
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
78
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
79
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
80
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
81
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
82
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
83
- </PropertyGroup>
84
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
85
- <ClCompile>
86
- <Optimization>Disabled</Optimization>
87
- <AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)win32;$(SolutionDir)lib\crf\include;$(SolutionDir)win32\liblbfgs;$(SolutionDir)lib\cqdb\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
88
- <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
89
- <MinimalRebuild>true</MinimalRebuild>
90
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
91
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
92
- <FloatingPointModel>Strict</FloatingPointModel>
93
- <FloatingPointExceptions>true</FloatingPointExceptions>
94
- <PrecompiledHeader>
95
- </PrecompiledHeader>
96
- <WarningLevel>Level3</WarningLevel>
97
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
98
- </ClCompile>
99
- <Lib>
100
- <AdditionalDependencies>lbfgs_debug.lib;%(AdditionalDependencies)</AdditionalDependencies>
101
- <AdditionalLibraryDirectories>$(SolutionDir)win32\liblbfgs;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
102
- </Lib>
103
- <ProjectReference>
104
- <LinkLibraryDependencies>true</LinkLibraryDependencies>
105
- </ProjectReference>
106
- </ItemDefinitionGroup>
107
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
108
- <ClCompile>
109
- <Optimization>Disabled</Optimization>
110
- <AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)win32;$(SolutionDir)lib\crf\include;$(SolutionDir)win32\liblbfgs;$(SolutionDir)lib\cqdb\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
111
- <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
112
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
113
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
114
- <FloatingPointModel>Strict</FloatingPointModel>
115
- <FloatingPointExceptions>true</FloatingPointExceptions>
116
- <PrecompiledHeader>
117
- </PrecompiledHeader>
118
- <WarningLevel>Level3</WarningLevel>
119
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
120
- </ClCompile>
121
- <Lib>
122
- <AdditionalDependencies>lbfgs_debug.lib;%(AdditionalDependencies)</AdditionalDependencies>
123
- <AdditionalLibraryDirectories>$(SolutionDir)win32\liblbfgs;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
124
- </Lib>
125
- <ProjectReference>
126
- <LinkLibraryDependencies>true</LinkLibraryDependencies>
127
- </ProjectReference>
128
- </ItemDefinitionGroup>
129
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
130
- <ClCompile>
131
- <Optimization>Full</Optimization>
132
- <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
133
- <IntrinsicFunctions>true</IntrinsicFunctions>
134
- <AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)win32;$(SolutionDir)lib\crf\include;$(SolutionDir)win32\liblbfgs;$(SolutionDir)lib\cqdb\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
135
- <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
136
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
137
- <FloatingPointExceptions>true</FloatingPointExceptions>
138
- <PrecompiledHeader>
139
- </PrecompiledHeader>
140
- <WarningLevel>Level1</WarningLevel>
141
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
142
- </ClCompile>
143
- <Lib>
144
- <AdditionalDependencies>lbfgs.lib;%(AdditionalDependencies)</AdditionalDependencies>
145
- <AdditionalLibraryDirectories>$(SolutionDir)win32\liblbfgs;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
146
- </Lib>
147
- <ProjectReference>
148
- <LinkLibraryDependencies>true</LinkLibraryDependencies>
149
- </ProjectReference>
150
- </ItemDefinitionGroup>
151
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
152
- <ClCompile>
153
- <Optimization>Full</Optimization>
154
- <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
155
- <IntrinsicFunctions>true</IntrinsicFunctions>
156
- <AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)win32;$(SolutionDir)lib\crf\include;$(SolutionDir)win32\liblbfgs;$(SolutionDir)lib\cqdb\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
157
- <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
158
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
159
- <FloatingPointExceptions>true</FloatingPointExceptions>
160
- <PrecompiledHeader>
161
- </PrecompiledHeader>
162
- <WarningLevel>Level1</WarningLevel>
163
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
164
- </ClCompile>
165
- <Lib>
166
- <AdditionalDependencies>lbfgs.lib;%(AdditionalDependencies)</AdditionalDependencies>
167
- <AdditionalLibraryDirectories>$(SolutionDir)win32\liblbfgs;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
168
- </Lib>
169
- <ProjectReference>
170
- <LinkLibraryDependencies>true</LinkLibraryDependencies>
171
- </ProjectReference>
172
- </ItemDefinitionGroup>
173
- <ItemGroup>
174
- <ClCompile Include="src\crf1d_encode.c" />
175
- <ClCompile Include="src\crfsuite.c" />
176
- <ClCompile Include="src\crfsuite_train.c" />
177
- <ClCompile Include="src\dataset.c" />
178
- <ClCompile Include="src\dictionary.c" />
179
- <ClCompile Include="src\holdout.c" />
180
- <ClCompile Include="src\logging.c" />
181
- <ClCompile Include="src\params.c" />
182
- <ClCompile Include="src\quark.c" />
183
- <ClCompile Include="src\rumavl.c" />
184
- <ClCompile Include="src\crf1d_context.c" />
185
- <ClCompile Include="src\crf1d_feature.c" />
186
- <ClCompile Include="src\crf1d_model.c" />
187
- <ClCompile Include="src\crf1d_tag.c" />
188
- <ClCompile Include="src\train_arow.c" />
189
- <ClCompile Include="src\train_averaged_perceptron.c" />
190
- <ClCompile Include="src\train_l2sgd.c" />
191
- <ClCompile Include="src\train_lbfgs.c" />
192
- <ClCompile Include="src\train_passive_aggressive.c" />
193
- </ItemGroup>
194
- <ItemGroup>
195
- <ClInclude Include="..\..\include\crfsuite.h" />
196
- <ClInclude Include="..\..\include\crfsuite.hpp" />
197
- <ClInclude Include="..\..\include\crfsuite_api.hpp" />
198
- <ClInclude Include="..\..\include\os.h" />
199
- <ClInclude Include="src\crfsuite_internal.h" />
200
- <ClInclude Include="src\logging.h" />
201
- <ClInclude Include="src\params.h" />
202
- <ClInclude Include="src\quark.h" />
203
- <ClInclude Include="src\rumavl.h" />
204
- <ClInclude Include="src\vecmath.h" />
205
- <ClInclude Include="src\crf1d.h" />
206
- </ItemGroup>
207
- <ItemGroup>
208
- <ProjectReference Include="..\cqdb\cqdb.vcxproj">
209
- <Project>{46a23de6-7e34-4429-8f15-fcc3c083fc5b}</Project>
210
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
211
- </ProjectReference>
212
- </ItemGroup>
213
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
214
- <ImportGroup Label="ExtensionTargets">
215
- </ImportGroup>
216
- </Project>
@@ -1,353 +0,0 @@
1
- /*
2
- * The 1st-order linear-chain CRF with dyad features (CRF1d).
3
- *
4
- * Copyright (c) 2007-2010, Naoaki Okazaki
5
- * All rights reserved.
6
- *
7
- * Redistribution and use in source and binary forms, with or without
8
- * modification, are permitted provided that the following conditions are met:
9
- * * Redistributions of source code must retain the above copyright
10
- * notice, this list of conditions and the following disclaimer.
11
- * * Redistributions in binary form must reproduce the above copyright
12
- * notice, this list of conditions and the following disclaimer in the
13
- * documentation and/or other materials provided with the distribution.
14
- * * Neither the names of the authors nor the names of its contributors
15
- * may be used to endorse or promote products derived from this
16
- * software without specific prior written permission.
17
- *
18
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
22
- * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
25
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
26
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
- */
30
-
31
- /* $Id$ */
32
-
33
- #ifndef __CRF1D_H__
34
- #define __CRF1D_H__
35
-
36
- #include <crfsuite.h>
37
- #include "crfsuite_internal.h"
38
-
39
-
40
- /**
41
- * \defgroup crf1d_context.c
42
- */
43
- /** @{ */
44
-
45
- /**
46
- * Functionality flags for contexts.
47
- * @see crf1dc_new().
48
- */
49
- enum {
50
- CTXF_BASE = 0x01,
51
- CTXF_VITERBI = 0x01,
52
- CTXF_MARGINALS = 0x02,
53
- CTXF_ALL = 0xFF,
54
- };
55
-
56
- /**
57
- * Reset flags.
58
- * @see crf1dc_reset().
59
- */
60
- enum {
61
- RF_STATE = 0x01, /**< Reset state scores. */
62
- RF_TRANS = 0x02, /**< Reset transition scores. */
63
- RF_ALL = 0xFF, /**< Reset all. */
64
- };
65
-
66
- /**
67
- * Context structure.
68
- * This structure maintains internal data for an instance.
69
- */
70
- typedef struct {
71
- /**
72
- * Flag specifying the functionality.
73
- */
74
- int flag;
75
-
76
- /**
77
- * The total number of distinct labels (L).
78
- */
79
- int num_labels;
80
-
81
- /**
82
- * The number of items (T) in the instance.
83
- */
84
- int num_items;
85
-
86
- /**
87
- * The maximum number of labels.
88
- */
89
- int cap_items;
90
-
91
- /**
92
- * Logarithm of the normalization factor for the instance.
93
- * This is equivalent to the total scores of all paths in the lattice.
94
- */
95
- floatval_t log_norm;
96
-
97
- /**
98
- * State scores.
99
- * This is a [T][L] matrix whose element [t][l] presents total score
100
- * of state features associating label #l at #t.
101
- */
102
- floatval_t *state;
103
-
104
- /**
105
- * Transition scores.
106
- * This is a [L][L] matrix whose element [i][j] represents the total
107
- * score of transition features associating labels #i and #j.
108
- */
109
- floatval_t *trans;
110
-
111
- /**
112
- * Alpha score matrix.
113
- * This is a [T][L] matrix whose element [t][l] presents the total
114
- * score of paths starting at BOS and arraiving at (t, l).
115
- */
116
- floatval_t *alpha_score;
117
-
118
- /**
119
- * Beta score matrix.
120
- * This is a [T][L] matrix whose element [t][l] presents the total
121
- * score of paths starting at (t, l) and arraiving at EOS.
122
- */
123
- floatval_t *beta_score;
124
-
125
- /**
126
- * Scale factor vector.
127
- * This is a [T] vector whose element [t] presents the scaling
128
- * coefficient for the alpha_score and beta_score.
129
- */
130
- floatval_t *scale_factor;
131
-
132
- /**
133
- * Row vector (work space).
134
- * This is a [T] vector used internally for a work space.
135
- */
136
- floatval_t *row;
137
-
138
- /**
139
- * Backward edges.
140
- * This is a [T][L] matrix whose element [t][j] represents the label #i
141
- * that yields the maximum score to arrive at (t, j).
142
- * This member is available only with CTXF_VITERBI flag enabled.
143
- */
144
- int *backward_edge;
145
-
146
- /**
147
- * Exponents of state scores.
148
- * This is a [T][L] matrix whose element [t][l] presents the exponent
149
- * of the total score of state features associating label #l at #t.
150
- * This member is available only with CTXF_MARGINALS flag.
151
- */
152
- floatval_t *exp_state;
153
-
154
- /**
155
- * Exponents of transition scores.
156
- * This is a [L][L] matrix whose element [i][j] represents the exponent
157
- * of the total score of transition features associating labels #i and #j.
158
- * This member is available only with CTXF_MARGINALS flag.
159
- */
160
- floatval_t *exp_trans;
161
-
162
- /**
163
- * Model expectations of states.
164
- * This is a [T][L] matrix whose element [t][l] presents the model
165
- * expectation (marginal probability) of the state (t,l)
166
- * This member is available only with CTXF_MARGINALS flag.
167
- */
168
- floatval_t *mexp_state;
169
-
170
- /**
171
- * Model expectations of transitions.
172
- * This is a [L][L] matrix whose element [i][j] presents the model
173
- * expectation of the transition (i--j).
174
- * This member is available only with CTXF_MARGINALS flag.
175
- */
176
- floatval_t *mexp_trans;
177
-
178
- } crf1d_context_t;
179
-
180
- #define MATRIX(p, xl, x, y) ((p)[(xl) * (y) + (x)])
181
-
182
- #define ALPHA_SCORE(ctx, t) \
183
- (&MATRIX(ctx->alpha_score, ctx->num_labels, 0, t))
184
- #define BETA_SCORE(ctx, t) \
185
- (&MATRIX(ctx->beta_score, ctx->num_labels, 0, t))
186
- #define STATE_SCORE(ctx, i) \
187
- (&MATRIX(ctx->state, ctx->num_labels, 0, i))
188
- #define TRANS_SCORE(ctx, i) \
189
- (&MATRIX(ctx->trans, ctx->num_labels, 0, i))
190
- #define EXP_STATE_SCORE(ctx, i) \
191
- (&MATRIX(ctx->exp_state, ctx->num_labels, 0, i))
192
- #define EXP_TRANS_SCORE(ctx, i) \
193
- (&MATRIX(ctx->exp_trans, ctx->num_labels, 0, i))
194
- #define STATE_MEXP(ctx, i) \
195
- (&MATRIX(ctx->mexp_state, ctx->num_labels, 0, i))
196
- #define TRANS_MEXP(ctx, i) \
197
- (&MATRIX(ctx->mexp_trans, ctx->num_labels, 0, i))
198
- #define BACKWARD_EDGE_AT(ctx, t) \
199
- (&MATRIX(ctx->backward_edge, ctx->num_labels, 0, t))
200
-
201
- crf1d_context_t* crf1dc_new(int flag, int L, int T);
202
- int crf1dc_set_num_items(crf1d_context_t* ctx, int T);
203
- void crf1dc_delete(crf1d_context_t* ctx);
204
- void crf1dc_reset(crf1d_context_t* ctx, int flag);
205
- void crf1dc_exp_state(crf1d_context_t* ctx);
206
- void crf1dc_exp_transition(crf1d_context_t* ctx);
207
- void crf1dc_alpha_score(crf1d_context_t* ctx);
208
- void crf1dc_beta_score(crf1d_context_t* ctx);
209
- void crf1dc_marginals(crf1d_context_t* ctx);
210
- floatval_t crf1dc_marginal_point(crf1d_context_t *ctx, int l, int t);
211
- floatval_t crf1dc_marginal_path(crf1d_context_t *ctx, const int *path, int begin, int end);
212
- floatval_t crf1dc_score(crf1d_context_t* ctx, const int *labels);
213
- floatval_t crf1dc_lognorm(crf1d_context_t* ctx);
214
- floatval_t crf1dc_viterbi(crf1d_context_t* ctx, int *labels);
215
- void crf1dc_debug_context(FILE *fp);
216
-
217
- /** @} */
218
-
219
-
220
-
221
- /**
222
- * \defgroup crf1d_feature.c
223
- */
224
- /** @{ */
225
-
226
- /**
227
- * Feature type.
228
- */
229
- enum {
230
- FT_STATE = 0, /**< State features. */
231
- FT_TRANS, /**< Transition features. */
232
- };
233
-
234
- /**
235
- * A feature (for either state or transition).
236
- */
237
- typedef struct {
238
- /**
239
- * Feature type.
240
- * Possible values are:
241
- * - FT_STATE (0) for state features.
242
- * - FT_TRANS (1) for transition features.
243
- */
244
- int type;
245
-
246
- /**
247
- * Source id.
248
- * The semantic of this field depends on the feature type:
249
- * - attribute id for state features (type == 0).
250
- * - output label id for transition features (type != 0).
251
- */
252
- int src;
253
-
254
- /**
255
- * Destination id.
256
- * Label id emitted by this feature.
257
- */
258
- int dst;
259
-
260
- /**
261
- * Frequency (observation expectation).
262
- */
263
- floatval_t freq;
264
- } crf1df_feature_t;
265
-
266
- /**
267
- * Feature references.
268
- * This is a collection of feature ids used for faster accesses.
269
- */
270
- typedef struct {
271
- int num_features; /**< Number of features referred */
272
- int* fids; /**< Array of feature ids */
273
- } feature_refs_t;
274
-
275
- crf1df_feature_t* crf1df_generate(
276
- int *ptr_num_features,
277
- dataset_t *ds,
278
- int num_labels,
279
- int num_attributes,
280
- int connect_all_attrs,
281
- int connect_all_edges,
282
- floatval_t minfreq,
283
- crfsuite_logging_callback func,
284
- void *instance
285
- );
286
-
287
- int crf1df_init_references(
288
- feature_refs_t **ptr_attributes,
289
- feature_refs_t **ptr_trans,
290
- const crf1df_feature_t *features,
291
- const int K,
292
- const int A,
293
- const int L
294
- );
295
-
296
- /** @} */
297
-
298
-
299
-
300
- /**
301
- * \defgroup crf1d_model.c
302
- */
303
- /** @{ */
304
-
305
- struct tag_crf1dm;
306
- typedef struct tag_crf1dm crf1dm_t;
307
-
308
- struct tag_crf1dmw;
309
- typedef struct tag_crf1dmw crf1dmw_t;
310
-
311
- typedef struct {
312
- int type;
313
- int src;
314
- int dst;
315
- floatval_t weight;
316
- } crf1dm_feature_t;
317
-
318
- crf1dmw_t* crf1mmw(const char *filename);
319
- int crf1dmw_close(crf1dmw_t* writer);
320
- int crf1dmw_open_labels(crf1dmw_t* writer, int num_labels);
321
- int crf1dmw_close_labels(crf1dmw_t* writer);
322
- int crf1dmw_put_label(crf1dmw_t* writer, int lid, const char *value);
323
- int crf1dmw_open_attrs(crf1dmw_t* writer, int num_attributes);
324
- int crf1dmw_close_attrs(crf1dmw_t* writer);
325
- int crf1dmw_put_attr(crf1dmw_t* writer, int aid, const char *value);
326
- int crf1dmw_open_labelrefs(crf1dmw_t* writer, int num_labels);
327
- int crf1dmw_close_labelrefs(crf1dmw_t* writer);
328
- int crf1dmw_put_labelref(crf1dmw_t* writer, int lid, const feature_refs_t* ref, int *map);
329
- int crf1dmw_open_attrrefs(crf1dmw_t* writer, int num_attrs);
330
- int crf1dmw_close_attrrefs(crf1dmw_t* writer);
331
- int crf1dmw_put_attrref(crf1dmw_t* writer, int aid, const feature_refs_t* ref, int *map);
332
- int crf1dmw_open_features(crf1dmw_t* writer);
333
- int crf1dmw_close_features(crf1dmw_t* writer);
334
- int crf1dmw_put_feature(crf1dmw_t* writer, int fid, const crf1dm_feature_t* f);
335
-
336
- crf1dm_t* crf1dm_new(const char *filename);
337
- void crf1dm_close(crf1dm_t* model);
338
- int crf1dm_get_num_attrs(crf1dm_t* model);
339
- int crf1dm_get_num_labels(crf1dm_t* model);
340
- const char *crf1dm_to_label(crf1dm_t* model, int lid);
341
- int crf1dm_to_lid(crf1dm_t* model, const char *value);
342
- int crf1dm_to_aid(crf1dm_t* model, const char *value);
343
- const char *crf1dm_to_attr(crf1dm_t* model, int aid);
344
- int crf1dm_get_labelref(crf1dm_t* model, int lid, feature_refs_t* ref);
345
- int crf1dm_get_attrref(crf1dm_t* model, int aid, feature_refs_t* ref);
346
- int crf1dm_get_featureid(feature_refs_t* ref, int i);
347
- int crf1dm_get_feature(crf1dm_t* model, int fid, crf1dm_feature_t* f);
348
- void crf1dm_dump(crf1dm_t* model, FILE *fp);
349
-
350
- /** @} */
351
-
352
-
353
- #endif/*__CRF1D_H__*/