cld3 3.2.1 → 3.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +15 -1
- data/cld3.gemspec +3 -3
- data/ext/cld3/Makefile +263 -0
- data/ext/cld3/base.o +0 -0
- data/ext/cld3/embedding_feature_extractor.o +0 -0
- data/ext/cld3/embedding_network.o +0 -0
- data/ext/cld3/feature_extractor.o +0 -0
- data/ext/cld3/feature_extractor.pb.o +0 -0
- data/ext/cld3/feature_types.o +0 -0
- data/ext/cld3/fixunicodevalue.o +0 -0
- data/ext/cld3/fml_parser.o +0 -0
- data/ext/cld3/generated_entities.o +0 -0
- data/ext/cld3/generated_ulscript.o +0 -0
- data/ext/cld3/getonescriptspan.o +0 -0
- data/ext/cld3/lang_id_nn_params.o +0 -0
- data/ext/cld3/language_identifier_features.o +0 -0
- data/ext/cld3/libcld3.so +0 -0
- data/ext/cld3/mkmf.log +36 -0
- data/ext/cld3/nnet_language_identifier.o +0 -0
- data/ext/cld3/nnet_language_identifier_c.o +0 -0
- data/ext/cld3/offsetmap.o +0 -0
- data/ext/cld3/registry.o +0 -0
- data/ext/cld3/relevant_script_feature.o +0 -0
- data/ext/cld3/sentence.pb.o +0 -0
- data/ext/cld3/sentence_features.o +0 -0
- data/ext/cld3/task_context.o +0 -0
- data/ext/cld3/task_context_params.o +0 -0
- data/ext/cld3/task_spec.pb.o +0 -0
- data/ext/cld3/text_processing.o +0 -0
- data/ext/cld3/unicodetext.o +0 -0
- data/ext/cld3/utf8statetable.o +0 -0
- data/ext/cld3/utils.o +0 -0
- data/ext/cld3/workspace.o +0 -0
- metadata +39 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b56fea25a97cf6a197b72c514454008e4c04d0a8
|
4
|
+
data.tar.gz: a327ab423e7c93d99da7dc29c03a7510373766d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4162920fc33fe306c8f0b230fea912f5149bbb19099a47233267fd1eefaf1efd7a4d0436f89618d1b5673a30f83f7487b494ed12b7b758ce7f041222a6d1c11c
|
7
|
+
data.tar.gz: baa2e35f7d528da66ff3d4265c193bb00c81c616b41af0a67df9f2865b29c4f27d891fdb65e502d93498e604bb4b36f46137752add1f8cd7ecc74d793bcd2d33
|
data/README.md
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
# cld3-ruby
|
2
|
-
cld3-ruby is an interface of Compact Language Detector v3 (CLD3) for Ruby.
|
2
|
+
cld3-ruby is an interface of [Compact Language Detector v3 (CLD3)](https://github.com/google/cld3) for Ruby.
|
3
|
+
|
4
|
+
## Usage
|
5
|
+
|
6
|
+
```ruby
|
7
|
+
require 'cld3'
|
8
|
+
|
9
|
+
cld3 = CLD3::NNetLanguageIdentifier.new(0, 1000)
|
10
|
+
|
11
|
+
cld3.find_language("こんにちは") # => #<struct Struct::Result language=:ja, probability=1.0, reliable?=true, proportion=1.0>
|
12
|
+
|
13
|
+
cld3.find_language("This is a pen.") # => #<struct Struct::Result language=:en, probability=0.9999408721923828, reliable?=true, proportion=1.0>
|
14
|
+
|
15
|
+
cld3.find_language("здравствуйте") # => #<struct Struct::Result language=:ru, probability=0.3140212297439575, reliable?=false, proportion=1.0>
|
16
|
+
```
|
3
17
|
|
4
18
|
## Installation
|
5
19
|
### Prerequisites
|
data/cld3.gemspec
CHANGED
@@ -16,16 +16,16 @@
|
|
16
16
|
|
17
17
|
Gem::Specification.new do |gem|
|
18
18
|
gem.name = "cld3"
|
19
|
-
gem.version = "3.2.
|
19
|
+
gem.version = "3.2.2"
|
20
20
|
gem.summary = "Compact Language Detector v3 (CLD3)"
|
21
21
|
gem.description = "Compact Language Detector v3 (CLD3) is a neural network model for language identification."
|
22
22
|
gem.license = "Apache-2.0"
|
23
23
|
gem.homepage = "https://github.com/akihikodaki/cld3-ruby"
|
24
24
|
gem.author = "Akihiko Odaki"
|
25
25
|
gem.email = "akihiko.odaki.4i@stu.hosei.ac.jp"
|
26
|
-
gem.required_ruby_version = [ ">= 2.3.0", "< 2.
|
26
|
+
gem.required_ruby_version = [ ">= 2.3.0", "< 2.6.0" ]
|
27
27
|
gem.add_dependency "ffi", [ ">= 1.1.0", "< 1.10.0" ]
|
28
|
-
gem.add_development_dependency "rspec", [ ">=
|
28
|
+
gem.add_development_dependency "rspec", [ ">=3.0.0", "< 3.8.0" ]
|
29
29
|
gem.files = Dir[
|
30
30
|
"Gemfile", "LICENSE", "LICENSE_CLD3", "README.md",
|
31
31
|
"cld3.gemspec", "ext/**/*", "lib/**/*"
|
data/ext/cld3/Makefile
ADDED
@@ -0,0 +1,263 @@
|
|
1
|
+
|
2
|
+
SHELL = /bin/sh
|
3
|
+
|
4
|
+
# V=0 quiet, V=1 verbose. other values don't work.
|
5
|
+
V = 0
|
6
|
+
Q1 = $(V:1=)
|
7
|
+
Q = $(Q1:0=@)
|
8
|
+
ECHO1 = $(V:1=@ :)
|
9
|
+
ECHO = $(ECHO1:0=@ echo)
|
10
|
+
NULLCMD = :
|
11
|
+
|
12
|
+
#### Start of system configuration section. ####
|
13
|
+
|
14
|
+
srcdir = .
|
15
|
+
topdir = /usr/include/ruby-2.4.0
|
16
|
+
hdrdir = $(topdir)
|
17
|
+
arch_hdrdir = /usr/include/ruby-2.4.0/x86_64-linux
|
18
|
+
PATH_SEPARATOR = :
|
19
|
+
VPATH = $(srcdir):$(arch_hdrdir)/ruby:$(hdrdir)/ruby
|
20
|
+
prefix = $(DESTDIR)/usr
|
21
|
+
rubysitearchprefix = $(rubylibprefix)/$(sitearch)
|
22
|
+
rubyarchprefix = $(rubylibprefix)/$(arch)
|
23
|
+
rubylibprefix = $(libdir)/$(RUBY_BASE_NAME)
|
24
|
+
exec_prefix = $(prefix)
|
25
|
+
vendorarchhdrdir = $(vendorhdrdir)/$(sitearch)
|
26
|
+
sitearchhdrdir = $(sitehdrdir)/$(sitearch)
|
27
|
+
rubyarchhdrdir = $(rubyhdrdir)/$(arch)
|
28
|
+
vendorhdrdir = $(rubyhdrdir)/vendor_ruby
|
29
|
+
sitehdrdir = $(rubyhdrdir)/site_ruby
|
30
|
+
rubyhdrdir = $(includedir)/$(RUBY_VERSION_NAME)
|
31
|
+
vendorarchdir = $(vendorlibdir)/$(sitearch)
|
32
|
+
vendorlibdir = $(vendordir)/$(ruby_version)
|
33
|
+
vendordir = $(rubylibprefix)/vendor_ruby
|
34
|
+
sitearchdir = $(sitelibdir)/$(sitearch)
|
35
|
+
sitelibdir = $(sitedir)/$(ruby_version)
|
36
|
+
sitedir = $(rubylibprefix)/site_ruby
|
37
|
+
rubyarchdir = $(rubylibdir)/$(arch)
|
38
|
+
rubylibdir = $(rubylibprefix)/$(ruby_version)
|
39
|
+
sitearchincludedir = $(includedir)/$(sitearch)
|
40
|
+
archincludedir = $(includedir)/$(arch)
|
41
|
+
sitearchlibdir = $(libdir)/$(sitearch)
|
42
|
+
archlibdir = $(libdir)/$(arch)
|
43
|
+
ridir = $(datarootdir)/$(RI_BASE_NAME)
|
44
|
+
mandir = $(datarootdir)/man
|
45
|
+
localedir = $(datarootdir)/locale
|
46
|
+
libdir = $(exec_prefix)/lib
|
47
|
+
psdir = $(docdir)
|
48
|
+
pdfdir = $(docdir)
|
49
|
+
dvidir = $(docdir)
|
50
|
+
htmldir = $(docdir)
|
51
|
+
infodir = $(datarootdir)/info
|
52
|
+
docdir = $(datarootdir)/doc/$(PACKAGE)
|
53
|
+
oldincludedir = $(DESTDIR)/usr/include
|
54
|
+
includedir = $(prefix)/include
|
55
|
+
localstatedir = $(DESTDIR)/var
|
56
|
+
sharedstatedir = $(DESTDIR)/var/lib
|
57
|
+
sysconfdir = $(DESTDIR)/etc
|
58
|
+
datadir = $(datarootdir)
|
59
|
+
datarootdir = $(prefix)/share
|
60
|
+
libexecdir = $(DESTDIR)/usr/lib/ruby
|
61
|
+
sbindir = $(exec_prefix)/sbin
|
62
|
+
bindir = $(exec_prefix)/bin
|
63
|
+
archdir = $(rubyarchdir)
|
64
|
+
|
65
|
+
|
66
|
+
CC = gcc
|
67
|
+
CXX = g++
|
68
|
+
LIBRUBY = $(LIBRUBY_SO)
|
69
|
+
LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
|
70
|
+
LIBRUBYARG_SHARED = -l$(RUBY_SO_NAME)
|
71
|
+
LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static
|
72
|
+
empty =
|
73
|
+
OUTFLAG = -o $(empty)
|
74
|
+
COUTFLAG = -o $(empty)
|
75
|
+
CSRCFLAG = $(empty)
|
76
|
+
|
77
|
+
RUBY_EXTCONF_H =
|
78
|
+
cflags = $(optflags) $(debugflags) $(warnflags)
|
79
|
+
cxxflags = $(optflags) $(debugflags) $(warnflags)
|
80
|
+
optflags = -O3 -fno-fast-math
|
81
|
+
debugflags = -ggdb3
|
82
|
+
warnflags = -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat -Wsuggest-attribute=noreturn -Wsuggest-attribute=format -Wimplicit-fallthrough=0
|
83
|
+
CCDLFLAGS = -fPIC
|
84
|
+
CFLAGS = $(CCDLFLAGS) -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -fPIC -pthread $(ARCH_FLAG)
|
85
|
+
INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir)
|
86
|
+
DEFS =
|
87
|
+
CPPFLAGS = -D_FORTIFY_SOURCE=2 $(DEFS) $(cppflags)
|
88
|
+
CXXFLAGS = $(CCDLFLAGS) -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -pthread -fvisibility=hidden -std=c++11 $(ARCH_FLAG)
|
89
|
+
ldflags = -L. -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -fstack-protector -rdynamic -Wl,-export-dynamic -pthread
|
90
|
+
dldflags = -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -Wl,--compress-debug-sections=zlib
|
91
|
+
ARCH_FLAG =
|
92
|
+
DLDFLAGS = $(ldflags) $(dldflags) $(ARCH_FLAG)
|
93
|
+
LDSHARED = $(CC) -shared
|
94
|
+
LDSHAREDXX = $(CXX) -shared
|
95
|
+
AR = ar
|
96
|
+
EXEEXT =
|
97
|
+
|
98
|
+
RUBY_INSTALL_NAME = $(RUBY_BASE_NAME)
|
99
|
+
RUBY_SO_NAME = ruby
|
100
|
+
RUBYW_INSTALL_NAME =
|
101
|
+
RUBY_VERSION_NAME = $(RUBY_BASE_NAME)-$(ruby_version)
|
102
|
+
RUBYW_BASE_NAME = rubyw
|
103
|
+
RUBY_BASE_NAME = ruby
|
104
|
+
|
105
|
+
arch = x86_64-linux
|
106
|
+
sitearch = $(arch)
|
107
|
+
ruby_version = 2.4.0
|
108
|
+
ruby = $(bindir)/$(RUBY_BASE_NAME)
|
109
|
+
RUBY = $(ruby)
|
110
|
+
ruby_headers = $(hdrdir)/ruby.h $(hdrdir)/ruby/backward.h $(hdrdir)/ruby/ruby.h $(hdrdir)/ruby/defines.h $(hdrdir)/ruby/missing.h $(hdrdir)/ruby/intern.h $(hdrdir)/ruby/st.h $(hdrdir)/ruby/subst.h $(arch_hdrdir)/ruby/config.h
|
111
|
+
|
112
|
+
RM = rm -f
|
113
|
+
RM_RF = $(RUBY) -run -e rm -- -rf
|
114
|
+
RMDIRS = rmdir --ignore-fail-on-non-empty -p
|
115
|
+
MAKEDIRS = /usr/bin/mkdir -p
|
116
|
+
INSTALL = /usr/bin/install -c
|
117
|
+
INSTALL_PROG = $(INSTALL) -m 0755
|
118
|
+
INSTALL_DATA = $(INSTALL) -m 644
|
119
|
+
COPY = cp
|
120
|
+
TOUCH = exit >
|
121
|
+
|
122
|
+
#### End of system configuration section. ####
|
123
|
+
|
124
|
+
preload =
|
125
|
+
libpath = . $(libdir)
|
126
|
+
LIBPATH = -L. -L$(libdir)
|
127
|
+
DEFFILE =
|
128
|
+
|
129
|
+
CLEANFILES = mkmf.log
|
130
|
+
DISTCLEANFILES =
|
131
|
+
DISTCLEANDIRS =
|
132
|
+
|
133
|
+
extout =
|
134
|
+
extout_prefix =
|
135
|
+
target_prefix =
|
136
|
+
LOCAL_LIBS =
|
137
|
+
LIBS = $(LIBRUBYARG_SHARED) -lprotobuf -lpthread -lpthread -lgmp -ldl -lcrypt -lm -lc
|
138
|
+
ORIG_SRCS = base.cc embedding_feature_extractor.cc embedding_network.cc feature_extractor.cc feature_extractor.pb.cc feature_types.cc fixunicodevalue.cc fml_parser.cc generated_entities.cc generated_ulscript.cc getonescriptspan.cc lang_id_nn_params.cc language_identifier_features.cc nnet_language_identifier.cc nnet_language_identifier_c.cc offsetmap.cc registry.cc relevant_script_feature.cc sentence.pb.cc sentence_features.cc task_context.cc task_context_params.cc task_spec.pb.cc text_processing.cc unicodetext.cc utf8statetable.cc utils.cc workspace.cc
|
139
|
+
SRCS = $(ORIG_SRCS)
|
140
|
+
OBJS = base.o embedding_feature_extractor.o embedding_network.o feature_extractor.o feature_extractor.pb.o feature_types.o fixunicodevalue.o fml_parser.o generated_entities.o generated_ulscript.o getonescriptspan.o lang_id_nn_params.o language_identifier_features.o nnet_language_identifier.o nnet_language_identifier_c.o offsetmap.o registry.o relevant_script_feature.o sentence.pb.o sentence_features.o task_context.o task_context_params.o task_spec.pb.o text_processing.o unicodetext.o utf8statetable.o utils.o workspace.o
|
141
|
+
HDRS = $(srcdir)/base.h $(srcdir)/casts.h $(srcdir)/embedding_feature_extractor.h $(srcdir)/embedding_network.h $(srcdir)/embedding_network_params.h $(srcdir)/feature_extractor.h $(srcdir)/feature_types.h $(srcdir)/float16.h $(srcdir)/fml_parser.h $(srcdir)/language_identifier_features.h $(srcdir)/lang_id_nn_params.h $(srcdir)/nnet_language_identifier.h $(srcdir)/registry.h $(srcdir)/relevant_script_feature.h $(srcdir)/script_detector.h $(srcdir)/sentence_features.h $(srcdir)/simple_adder.h $(srcdir)/fixunicodevalue.h $(srcdir)/generated_ulscript.h $(srcdir)/getonescriptspan.h $(srcdir)/integral_types.h $(srcdir)/offsetmap.h $(srcdir)/port.h $(srcdir)/stringpiece.h $(srcdir)/text_processing.h $(srcdir)/utf8acceptinterchange.h $(srcdir)/utf8prop_lettermarkscriptnum.h $(srcdir)/utf8repl_lettermarklower.h $(srcdir)/utf8scannot_lettermarkspecial.h $(srcdir)/utf8statetable.h $(srcdir)/task_context.h $(srcdir)/task_context_params.h $(srcdir)/unicodetext.h $(srcdir)/utils.h $(srcdir)/workspace.h $(srcdir)/feature_extractor.pb.h $(srcdir)/sentence.pb.h $(srcdir)/task_spec.pb.h
|
142
|
+
LOCAL_HDRS =
|
143
|
+
TARGET = libcld3
|
144
|
+
TARGET_NAME = libcld3
|
145
|
+
TARGET_ENTRY = Init_$(TARGET_NAME)
|
146
|
+
DLLIB = $(TARGET).so
|
147
|
+
EXTSTATIC =
|
148
|
+
STATIC_LIB =
|
149
|
+
|
150
|
+
TIMESTAMP_DIR = .
|
151
|
+
BINDIR = $(bindir)
|
152
|
+
RUBYCOMMONDIR = $(sitedir)$(target_prefix)
|
153
|
+
RUBYLIBDIR = $(sitelibdir)$(target_prefix)
|
154
|
+
RUBYARCHDIR = $(sitearchdir)$(target_prefix)
|
155
|
+
HDRDIR = $(rubyhdrdir)/ruby$(target_prefix)
|
156
|
+
ARCHHDRDIR = $(rubyhdrdir)/$(arch)/ruby$(target_prefix)
|
157
|
+
TARGET_SO_DIR =
|
158
|
+
TARGET_SO = $(TARGET_SO_DIR)$(DLLIB)
|
159
|
+
CLEANLIBS = $(TARGET_SO)
|
160
|
+
CLEANOBJS = *.o *.bak
|
161
|
+
|
162
|
+
all: $(DLLIB)
|
163
|
+
static: $(STATIC_LIB)
|
164
|
+
.PHONY: all install static install-so install-rb
|
165
|
+
.PHONY: clean clean-so clean-static clean-rb
|
166
|
+
|
167
|
+
clean-static::
|
168
|
+
clean-rb-default::
|
169
|
+
clean-rb::
|
170
|
+
clean-so::
|
171
|
+
clean: clean-so clean-static clean-rb-default clean-rb
|
172
|
+
-$(Q)$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES) .*.time
|
173
|
+
|
174
|
+
distclean-rb-default::
|
175
|
+
distclean-rb::
|
176
|
+
distclean-so::
|
177
|
+
distclean-static::
|
178
|
+
distclean: clean distclean-so distclean-static distclean-rb-default distclean-rb
|
179
|
+
-$(Q)$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
|
180
|
+
-$(Q)$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
|
181
|
+
-$(Q)$(RMDIRS) $(DISTCLEANDIRS) 2> /dev/null || true
|
182
|
+
|
183
|
+
realclean: distclean
|
184
|
+
install: install-so install-rb
|
185
|
+
|
186
|
+
install-so: $(DLLIB) $(TIMESTAMP_DIR)/.sitearchdir.time
|
187
|
+
$(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR)
|
188
|
+
clean-static::
|
189
|
+
-$(Q)$(RM) $(STATIC_LIB)
|
190
|
+
install-rb: pre-install-rb do-install-rb install-rb-default
|
191
|
+
install-rb-default: pre-install-rb-default do-install-rb-default
|
192
|
+
pre-install-rb: Makefile
|
193
|
+
pre-install-rb-default: Makefile
|
194
|
+
do-install-rb:
|
195
|
+
do-install-rb-default:
|
196
|
+
pre-install-rb-default:
|
197
|
+
@$(NULLCMD)
|
198
|
+
$(TIMESTAMP_DIR)/.sitearchdir.time:
|
199
|
+
$(Q) $(MAKEDIRS) $(@D) $(RUBYARCHDIR)
|
200
|
+
$(Q) $(TOUCH) $@
|
201
|
+
|
202
|
+
site-install: site-install-so site-install-rb
|
203
|
+
site-install-so: install-so
|
204
|
+
site-install-rb: install-rb
|
205
|
+
|
206
|
+
.SUFFIXES: .c .m .cc .mm .cxx .cpp .o .S
|
207
|
+
|
208
|
+
.cc.o:
|
209
|
+
$(ECHO) compiling $(<)
|
210
|
+
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
|
211
|
+
|
212
|
+
.cc.S:
|
213
|
+
$(ECHO) translating $(<)
|
214
|
+
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
|
215
|
+
|
216
|
+
.mm.o:
|
217
|
+
$(ECHO) compiling $(<)
|
218
|
+
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
|
219
|
+
|
220
|
+
.mm.S:
|
221
|
+
$(ECHO) translating $(<)
|
222
|
+
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
|
223
|
+
|
224
|
+
.cxx.o:
|
225
|
+
$(ECHO) compiling $(<)
|
226
|
+
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
|
227
|
+
|
228
|
+
.cxx.S:
|
229
|
+
$(ECHO) translating $(<)
|
230
|
+
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
|
231
|
+
|
232
|
+
.cpp.o:
|
233
|
+
$(ECHO) compiling $(<)
|
234
|
+
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
|
235
|
+
|
236
|
+
.cpp.S:
|
237
|
+
$(ECHO) translating $(<)
|
238
|
+
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
|
239
|
+
|
240
|
+
.c.o:
|
241
|
+
$(ECHO) compiling $(<)
|
242
|
+
$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
|
243
|
+
|
244
|
+
.c.S:
|
245
|
+
$(ECHO) translating $(<)
|
246
|
+
$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
|
247
|
+
|
248
|
+
.m.o:
|
249
|
+
$(ECHO) compiling $(<)
|
250
|
+
$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
|
251
|
+
|
252
|
+
.m.S:
|
253
|
+
$(ECHO) translating $(<)
|
254
|
+
$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
|
255
|
+
|
256
|
+
$(TARGET_SO): $(OBJS) Makefile
|
257
|
+
$(ECHO) linking shared-object $(DLLIB)
|
258
|
+
-$(Q)$(RM) $(@)
|
259
|
+
$(Q) $(LDSHAREDXX) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
$(OBJS): $(HDRS) $(ruby_headers)
|
data/ext/cld3/base.o
ADDED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/ext/cld3/libcld3.so
ADDED
Binary file
|
data/ext/cld3/mkmf.log
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
"pkg-config --exists protobuf"
|
2
|
+
| pkg-config --libs protobuf
|
3
|
+
=> "-lprotobuf -pthread -lpthread\n"
|
4
|
+
"gcc -o conftest -I/usr/include/ruby-2.4.0/x86_64-linux -I/usr/include/ruby-2.4.0/ruby/backward -I/usr/include/ruby-2.4.0 -I. -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -fPIC conftest.c -L. -L/usr/lib -L. -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -fstack-protector -rdynamic -Wl,-export-dynamic -lruby -lpthread -lgmp -ldl -lcrypt -lm -lc"
|
5
|
+
checked program was:
|
6
|
+
/* begin */
|
7
|
+
1: #include "ruby.h"
|
8
|
+
2:
|
9
|
+
3: int main(int argc, char **argv)
|
10
|
+
4: {
|
11
|
+
5: return 0;
|
12
|
+
6: }
|
13
|
+
/* end */
|
14
|
+
|
15
|
+
"gcc -o conftest -I/usr/include/ruby-2.4.0/x86_64-linux -I/usr/include/ruby-2.4.0/ruby/backward -I/usr/include/ruby-2.4.0 -I. -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -fPIC conftest.c -L. -L/usr/lib -L. -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -fstack-protector -rdynamic -Wl,-export-dynamic -lruby -lprotobuf -pthread -lpthread -lpthread -lgmp -ldl -lcrypt -lm -lc"
|
16
|
+
checked program was:
|
17
|
+
/* begin */
|
18
|
+
1: #include "ruby.h"
|
19
|
+
2:
|
20
|
+
3: int main(int argc, char **argv)
|
21
|
+
4: {
|
22
|
+
5: return 0;
|
23
|
+
6: }
|
24
|
+
/* end */
|
25
|
+
|
26
|
+
| pkg-config --cflags-only-I protobuf
|
27
|
+
=> "\n"
|
28
|
+
| pkg-config --cflags-only-other protobuf
|
29
|
+
=> "-pthread\n"
|
30
|
+
| pkg-config --libs-only-l protobuf
|
31
|
+
=> "-lprotobuf -lpthread\n"
|
32
|
+
package configuration for protobuf
|
33
|
+
cflags: -pthread
|
34
|
+
ldflags: -pthread
|
35
|
+
libs: -lprotobuf -lpthread
|
36
|
+
|
Binary file
|
Binary file
|
Binary file
|
data/ext/cld3/registry.o
ADDED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/ext/cld3/utils.o
ADDED
Binary file
|
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cld3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Akihiko Odaki
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-12-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|
@@ -36,20 +36,20 @@ dependencies:
|
|
36
36
|
requirements:
|
37
37
|
- - ">="
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version:
|
39
|
+
version: 3.0.0
|
40
40
|
- - "<"
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: 3.
|
42
|
+
version: 3.8.0
|
43
43
|
type: :development
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
47
|
- - ">="
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version:
|
49
|
+
version: 3.0.0
|
50
50
|
- - "<"
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: 3.
|
52
|
+
version: 3.8.0
|
53
53
|
description: Compact Language Detector v3 (CLD3) is a neural network model for language
|
54
54
|
identification.
|
55
55
|
email: akihiko.odaki.4i@stu.hosei.ac.jp
|
@@ -63,70 +63,101 @@ files:
|
|
63
63
|
- LICENSE_CLD3
|
64
64
|
- README.md
|
65
65
|
- cld3.gemspec
|
66
|
+
- ext/cld3/Makefile
|
66
67
|
- ext/cld3/base.cc
|
67
68
|
- ext/cld3/base.h
|
69
|
+
- ext/cld3/base.o
|
68
70
|
- ext/cld3/casts.h
|
69
71
|
- ext/cld3/embedding_feature_extractor.cc
|
70
72
|
- ext/cld3/embedding_feature_extractor.h
|
73
|
+
- ext/cld3/embedding_feature_extractor.o
|
71
74
|
- ext/cld3/embedding_network.cc
|
72
75
|
- ext/cld3/embedding_network.h
|
76
|
+
- ext/cld3/embedding_network.o
|
73
77
|
- ext/cld3/embedding_network_params.h
|
74
78
|
- ext/cld3/extconf.rb
|
75
79
|
- ext/cld3/feature_extractor.cc
|
76
80
|
- ext/cld3/feature_extractor.h
|
81
|
+
- ext/cld3/feature_extractor.o
|
82
|
+
- ext/cld3/feature_extractor.pb.o
|
77
83
|
- ext/cld3/feature_extractor.proto
|
78
84
|
- ext/cld3/feature_types.cc
|
79
85
|
- ext/cld3/feature_types.h
|
86
|
+
- ext/cld3/feature_types.o
|
80
87
|
- ext/cld3/fixunicodevalue.cc
|
81
88
|
- ext/cld3/fixunicodevalue.h
|
89
|
+
- ext/cld3/fixunicodevalue.o
|
82
90
|
- ext/cld3/float16.h
|
83
91
|
- ext/cld3/fml_parser.cc
|
84
92
|
- ext/cld3/fml_parser.h
|
93
|
+
- ext/cld3/fml_parser.o
|
85
94
|
- ext/cld3/generated_entities.cc
|
95
|
+
- ext/cld3/generated_entities.o
|
86
96
|
- ext/cld3/generated_ulscript.cc
|
87
97
|
- ext/cld3/generated_ulscript.h
|
98
|
+
- ext/cld3/generated_ulscript.o
|
88
99
|
- ext/cld3/getonescriptspan.cc
|
89
100
|
- ext/cld3/getonescriptspan.h
|
101
|
+
- ext/cld3/getonescriptspan.o
|
90
102
|
- ext/cld3/integral_types.h
|
91
103
|
- ext/cld3/lang_id_nn_params.cc
|
92
104
|
- ext/cld3/lang_id_nn_params.h
|
105
|
+
- ext/cld3/lang_id_nn_params.o
|
93
106
|
- ext/cld3/language_identifier_features.cc
|
94
107
|
- ext/cld3/language_identifier_features.h
|
108
|
+
- ext/cld3/language_identifier_features.o
|
109
|
+
- ext/cld3/libcld3.so
|
110
|
+
- ext/cld3/mkmf.log
|
95
111
|
- ext/cld3/nnet_language_identifier.cc
|
96
112
|
- ext/cld3/nnet_language_identifier.h
|
113
|
+
- ext/cld3/nnet_language_identifier.o
|
97
114
|
- ext/cld3/nnet_language_identifier_c.cc
|
115
|
+
- ext/cld3/nnet_language_identifier_c.o
|
98
116
|
- ext/cld3/offsetmap.cc
|
99
117
|
- ext/cld3/offsetmap.h
|
118
|
+
- ext/cld3/offsetmap.o
|
100
119
|
- ext/cld3/port.h
|
101
120
|
- ext/cld3/registry.cc
|
102
121
|
- ext/cld3/registry.h
|
122
|
+
- ext/cld3/registry.o
|
103
123
|
- ext/cld3/relevant_script_feature.cc
|
104
124
|
- ext/cld3/relevant_script_feature.h
|
125
|
+
- ext/cld3/relevant_script_feature.o
|
105
126
|
- ext/cld3/script_detector.h
|
127
|
+
- ext/cld3/sentence.pb.o
|
106
128
|
- ext/cld3/sentence.proto
|
107
129
|
- ext/cld3/sentence_features.cc
|
108
130
|
- ext/cld3/sentence_features.h
|
131
|
+
- ext/cld3/sentence_features.o
|
109
132
|
- ext/cld3/simple_adder.h
|
110
133
|
- ext/cld3/stringpiece.h
|
111
134
|
- ext/cld3/task_context.cc
|
112
135
|
- ext/cld3/task_context.h
|
136
|
+
- ext/cld3/task_context.o
|
113
137
|
- ext/cld3/task_context_params.cc
|
114
138
|
- ext/cld3/task_context_params.h
|
139
|
+
- ext/cld3/task_context_params.o
|
140
|
+
- ext/cld3/task_spec.pb.o
|
115
141
|
- ext/cld3/task_spec.proto
|
116
142
|
- ext/cld3/text_processing.cc
|
117
143
|
- ext/cld3/text_processing.h
|
144
|
+
- ext/cld3/text_processing.o
|
118
145
|
- ext/cld3/unicodetext.cc
|
119
146
|
- ext/cld3/unicodetext.h
|
147
|
+
- ext/cld3/unicodetext.o
|
120
148
|
- ext/cld3/utf8acceptinterchange.h
|
121
149
|
- ext/cld3/utf8prop_lettermarkscriptnum.h
|
122
150
|
- ext/cld3/utf8repl_lettermarklower.h
|
123
151
|
- ext/cld3/utf8scannot_lettermarkspecial.h
|
124
152
|
- ext/cld3/utf8statetable.cc
|
125
153
|
- ext/cld3/utf8statetable.h
|
154
|
+
- ext/cld3/utf8statetable.o
|
126
155
|
- ext/cld3/utils.cc
|
127
156
|
- ext/cld3/utils.h
|
157
|
+
- ext/cld3/utils.o
|
128
158
|
- ext/cld3/workspace.cc
|
129
159
|
- ext/cld3/workspace.h
|
160
|
+
- ext/cld3/workspace.o
|
130
161
|
- lib/cld3.rb
|
131
162
|
homepage: https://github.com/akihikodaki/cld3-ruby
|
132
163
|
licenses:
|
@@ -143,7 +174,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
143
174
|
version: 2.3.0
|
144
175
|
- - "<"
|
145
176
|
- !ruby/object:Gem::Version
|
146
|
-
version: 2.
|
177
|
+
version: 2.6.0
|
147
178
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
148
179
|
requirements:
|
149
180
|
- - ">="
|
@@ -151,7 +182,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
151
182
|
version: '0'
|
152
183
|
requirements: []
|
153
184
|
rubyforge_project:
|
154
|
-
rubygems_version: 2.6.
|
185
|
+
rubygems_version: 2.6.14
|
155
186
|
signing_key:
|
156
187
|
specification_version: 4
|
157
188
|
summary: Compact Language Detector v3 (CLD3)
|