cld3 3.3.0 → 3.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/LICENSE +2 -2
- data/cld3.gemspec +6 -6
- data/ext/cld3/Makefile +265 -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/extconf.rb +3 -2
- 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.def +8 -0
- data/ext/cld3/libcld3.so +0 -0
- data/ext/cld3/mkmf.log +37 -0
- data/ext/cld3/nnet_language_identifier.o +0 -0
- data/ext/cld3/nnet_language_identifier_c.cc +1 -1
- 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
- data/lib/cld3.rb +2 -2
- metadata +45 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f0a9191f0fbd79674343aa4f9891fa08a86793db1442b5f31d9d888676943d4c
|
4
|
+
data.tar.gz: af0463b862b500f28af14626216fd7bd43ed070e697d3a2f26d300718d7921f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 180f810231955b088c3d99784655e4560394868e06c5fcebf922462a4d4410d50cb009775790bb427a1f4f4da9f3bed3c8acc865bf64a02cd653c2e4e1cad6d3
|
7
|
+
data.tar.gz: 39b2cc9cc364ec806c35b17016fd9d37e03a525803415dd738cf1355eea3af5a50ea99ec99d18eb9eb10b569eeb749ffeb2a45e964919f6239a63dacde89ca4d
|
data/Gemfile
CHANGED
data/LICENSE
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Copyright 2017 Akihiko Odaki <
|
1
|
+
Copyright 2017 Akihiko Odaki <nekomanma@pixiv.co.jp>
|
2
2
|
All rights reserved.
|
3
3
|
|
4
4
|
Apache License
|
@@ -189,7 +189,7 @@ All rights reserved.
|
|
189
189
|
same "printed page" as the copyright notice for easier
|
190
190
|
identification within third-party archives.
|
191
191
|
|
192
|
-
Copyright 2017, Akihiko Odaki <
|
192
|
+
Copyright 2017, Akihiko Odaki <nekomanma@pixiv.co.jp>
|
193
193
|
|
194
194
|
Licensed under the Apache License, Version 2.0 (the "License");
|
195
195
|
you may not use this file except in compliance with the License.
|
data/cld3.gemspec
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright 2017 Akihiko Odaki <
|
1
|
+
# Copyright 2017 Akihiko Odaki <nekomanma@pixiv.co.jp>
|
2
2
|
# All Rights Reserved.
|
3
3
|
#
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -16,16 +16,16 @@
|
|
16
16
|
|
17
17
|
Gem::Specification.new do |gem|
|
18
18
|
gem.name = "cld3"
|
19
|
-
gem.version = "3.
|
19
|
+
gem.version = "3.4.1"
|
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
|
-
gem.email = "
|
26
|
-
gem.required_ruby_version = [ ">= 2.
|
27
|
-
gem.add_dependency "ffi", [ ">= 1.1.0", "< 1.
|
28
|
-
gem.add_development_dependency "rspec", [ ">=3.0.0", "< 3.
|
25
|
+
gem.email = "nekomanma@pixiv.co.jp"
|
26
|
+
gem.required_ruby_version = [ ">= 2.6.0", "< 3.1.0" ]
|
27
|
+
gem.add_dependency "ffi", [ ">= 1.1.0", "< 1.15.0" ]
|
28
|
+
gem.add_development_dependency "rspec", [ ">=3.0.0", "< 3.11.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,265 @@
|
|
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 = /var/home/person/ruby-v_3_0_0_preview1/include/ruby-3.0.0
|
16
|
+
hdrdir = $(topdir)
|
17
|
+
arch_hdrdir = /var/home/person/ruby-v_3_0_0_preview1/include/ruby-3.0.0/x86_64-linux
|
18
|
+
PATH_SEPARATOR = :
|
19
|
+
VPATH = $(srcdir):$(arch_hdrdir)/ruby:$(hdrdir)/ruby
|
20
|
+
prefix = $(DESTDIR)/var/home/person/ruby-v_3_0_0_preview1
|
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 = $(prefix)/var
|
56
|
+
sharedstatedir = $(prefix)/com
|
57
|
+
sysconfdir = $(prefix)/etc
|
58
|
+
datadir = $(datarootdir)
|
59
|
+
datarootdir = $(prefix)/share
|
60
|
+
libexecdir = $(exec_prefix)/libexec
|
61
|
+
sbindir = $(exec_prefix)/sbin
|
62
|
+
bindir = $(exec_prefix)/bin
|
63
|
+
archdir = $(rubyarchdir)
|
64
|
+
|
65
|
+
|
66
|
+
CC_WRAPPER =
|
67
|
+
CC = gcc
|
68
|
+
CXX = g++
|
69
|
+
LIBRUBY = $(LIBRUBY_A)
|
70
|
+
LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
|
71
|
+
LIBRUBYARG_SHARED = -Wl,-rpath,$(libdir) -L$(libdir)
|
72
|
+
LIBRUBYARG_STATIC = -Wl,-rpath,$(libdir) -L$(libdir) -l$(RUBY_SO_NAME)-static $(MAINLIBS)
|
73
|
+
empty =
|
74
|
+
OUTFLAG = -o $(empty)
|
75
|
+
COUTFLAG = -o $(empty)
|
76
|
+
CSRCFLAG = $(empty)
|
77
|
+
|
78
|
+
RUBY_EXTCONF_H =
|
79
|
+
cflags = $(optflags) $(debugflags) $(warnflags)
|
80
|
+
cxxflags =
|
81
|
+
optflags = -O3
|
82
|
+
debugflags = -ggdb3
|
83
|
+
warnflags = -Wall -Wextra -Wdeprecated-declarations -Wduplicated-cond -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wwrite-strings -Wimplicit-fallthrough=0 -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable
|
84
|
+
cppflags =
|
85
|
+
CCDLFLAGS = -fPIC
|
86
|
+
CFLAGS = $(CCDLFLAGS) $(cflags) $(ARCH_FLAG)
|
87
|
+
INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir)
|
88
|
+
DEFS =
|
89
|
+
CPPFLAGS = $(DEFS) $(cppflags)
|
90
|
+
CXXFLAGS = $(CCDLFLAGS) -fvisibility=hidden -std=c++11 $(ARCH_FLAG)
|
91
|
+
ldflags = -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic
|
92
|
+
dldflags = -Wl,--compress-debug-sections=zlib
|
93
|
+
ARCH_FLAG =
|
94
|
+
DLDFLAGS = $(ldflags) $(dldflags) $(ARCH_FLAG)
|
95
|
+
LDSHARED = $(CC) -shared
|
96
|
+
LDSHAREDXX = $(CXX) -shared
|
97
|
+
AR = gcc-ar
|
98
|
+
EXEEXT =
|
99
|
+
|
100
|
+
RUBY_INSTALL_NAME = $(RUBY_BASE_NAME)
|
101
|
+
RUBY_SO_NAME = ruby
|
102
|
+
RUBYW_INSTALL_NAME =
|
103
|
+
RUBY_VERSION_NAME = $(RUBY_BASE_NAME)-$(ruby_version)
|
104
|
+
RUBYW_BASE_NAME = rubyw
|
105
|
+
RUBY_BASE_NAME = ruby
|
106
|
+
|
107
|
+
arch = x86_64-linux
|
108
|
+
sitearch = $(arch)
|
109
|
+
ruby_version = 3.0.0
|
110
|
+
ruby = $(bindir)/$(RUBY_BASE_NAME)
|
111
|
+
RUBY = $(ruby)
|
112
|
+
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
|
113
|
+
|
114
|
+
RM = rm -f
|
115
|
+
RM_RF = $(RUBY) -run -e rm -- -rf
|
116
|
+
RMDIRS = rmdir --ignore-fail-on-non-empty -p
|
117
|
+
MAKEDIRS = /usr/bin/mkdir -p
|
118
|
+
INSTALL = /usr/bin/install -c
|
119
|
+
INSTALL_PROG = $(INSTALL) -m 0755
|
120
|
+
INSTALL_DATA = $(INSTALL) -m 644
|
121
|
+
COPY = cp
|
122
|
+
TOUCH = exit >
|
123
|
+
|
124
|
+
#### End of system configuration section. ####
|
125
|
+
|
126
|
+
preload =
|
127
|
+
libpath = . $(libdir)
|
128
|
+
LIBPATH = -L. -L$(libdir) -Wl,-rpath,$(libdir)
|
129
|
+
DEFFILE =
|
130
|
+
|
131
|
+
CLEANFILES = mkmf.log
|
132
|
+
DISTCLEANFILES =
|
133
|
+
DISTCLEANDIRS =
|
134
|
+
|
135
|
+
extout =
|
136
|
+
extout_prefix =
|
137
|
+
target_prefix =
|
138
|
+
LOCAL_LIBS =
|
139
|
+
LIBS = -lprotobuf -lpthread -lm -lc
|
140
|
+
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
|
141
|
+
SRCS = $(ORIG_SRCS)
|
142
|
+
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
|
143
|
+
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_extractor.pb.h $(srcdir)/feature_types.h $(srcdir)/fixunicodevalue.h $(srcdir)/float16.h $(srcdir)/fml_parser.h $(srcdir)/generated_ulscript.h $(srcdir)/getonescriptspan.h $(srcdir)/integral_types.h $(srcdir)/lang_id_nn_params.h $(srcdir)/language_identifier_features.h $(srcdir)/nnet_language_identifier.h $(srcdir)/offsetmap.h $(srcdir)/port.h $(srcdir)/registry.h $(srcdir)/relevant_script_feature.h $(srcdir)/script_detector.h $(srcdir)/sentence.pb.h $(srcdir)/sentence_features.h $(srcdir)/simple_adder.h $(srcdir)/stringpiece.h $(srcdir)/task_context.h $(srcdir)/task_context_params.h $(srcdir)/task_spec.pb.h $(srcdir)/text_processing.h $(srcdir)/unicodetext.h $(srcdir)/utf8acceptinterchange.h $(srcdir)/utf8prop_lettermarkscriptnum.h $(srcdir)/utf8repl_lettermarklower.h $(srcdir)/utf8scannot_lettermarkspecial.h $(srcdir)/utf8statetable.h $(srcdir)/utils.h $(srcdir)/workspace.h
|
144
|
+
LOCAL_HDRS =
|
145
|
+
TARGET = libcld3
|
146
|
+
TARGET_NAME = libcld3
|
147
|
+
TARGET_ENTRY = Init_$(TARGET_NAME)
|
148
|
+
DLLIB = $(TARGET).so
|
149
|
+
EXTSTATIC =
|
150
|
+
STATIC_LIB =
|
151
|
+
|
152
|
+
TIMESTAMP_DIR = .
|
153
|
+
BINDIR = $(bindir)
|
154
|
+
RUBYCOMMONDIR = $(sitedir)$(target_prefix)
|
155
|
+
RUBYLIBDIR = $(sitelibdir)$(target_prefix)
|
156
|
+
RUBYARCHDIR = $(sitearchdir)$(target_prefix)
|
157
|
+
HDRDIR = $(rubyhdrdir)/ruby$(target_prefix)
|
158
|
+
ARCHHDRDIR = $(rubyhdrdir)/$(arch)/ruby$(target_prefix)
|
159
|
+
TARGET_SO_DIR =
|
160
|
+
TARGET_SO = $(TARGET_SO_DIR)$(DLLIB)
|
161
|
+
CLEANLIBS = $(TARGET_SO)
|
162
|
+
CLEANOBJS = *.o *.bak
|
163
|
+
|
164
|
+
all: $(DLLIB)
|
165
|
+
static: $(STATIC_LIB)
|
166
|
+
.PHONY: all install static install-so install-rb
|
167
|
+
.PHONY: clean clean-so clean-static clean-rb
|
168
|
+
|
169
|
+
clean-static::
|
170
|
+
clean-rb-default::
|
171
|
+
clean-rb::
|
172
|
+
clean-so::
|
173
|
+
clean: clean-so clean-static clean-rb-default clean-rb
|
174
|
+
-$(Q)$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES) .*.time
|
175
|
+
|
176
|
+
distclean-rb-default::
|
177
|
+
distclean-rb::
|
178
|
+
distclean-so::
|
179
|
+
distclean-static::
|
180
|
+
distclean: clean distclean-so distclean-static distclean-rb-default distclean-rb
|
181
|
+
-$(Q)$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
|
182
|
+
-$(Q)$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
|
183
|
+
-$(Q)$(RMDIRS) $(DISTCLEANDIRS) 2> /dev/null || true
|
184
|
+
|
185
|
+
realclean: distclean
|
186
|
+
install: install-so install-rb
|
187
|
+
|
188
|
+
install-so: $(DLLIB) $(TIMESTAMP_DIR)/.sitearchdir.time
|
189
|
+
$(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR)
|
190
|
+
clean-static::
|
191
|
+
-$(Q)$(RM) $(STATIC_LIB)
|
192
|
+
install-rb: pre-install-rb do-install-rb install-rb-default
|
193
|
+
install-rb-default: pre-install-rb-default do-install-rb-default
|
194
|
+
pre-install-rb: Makefile
|
195
|
+
pre-install-rb-default: Makefile
|
196
|
+
do-install-rb:
|
197
|
+
do-install-rb-default:
|
198
|
+
pre-install-rb-default:
|
199
|
+
@$(NULLCMD)
|
200
|
+
$(TIMESTAMP_DIR)/.sitearchdir.time:
|
201
|
+
$(Q) $(MAKEDIRS) $(@D) $(RUBYARCHDIR)
|
202
|
+
$(Q) $(TOUCH) $@
|
203
|
+
|
204
|
+
site-install: site-install-so site-install-rb
|
205
|
+
site-install-so: install-so
|
206
|
+
site-install-rb: install-rb
|
207
|
+
|
208
|
+
.SUFFIXES: .c .m .cc .mm .cxx .cpp .o .S
|
209
|
+
|
210
|
+
.cc.o:
|
211
|
+
$(ECHO) compiling $(<)
|
212
|
+
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
|
213
|
+
|
214
|
+
.cc.S:
|
215
|
+
$(ECHO) translating $(<)
|
216
|
+
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
|
217
|
+
|
218
|
+
.mm.o:
|
219
|
+
$(ECHO) compiling $(<)
|
220
|
+
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
|
221
|
+
|
222
|
+
.mm.S:
|
223
|
+
$(ECHO) translating $(<)
|
224
|
+
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
|
225
|
+
|
226
|
+
.cxx.o:
|
227
|
+
$(ECHO) compiling $(<)
|
228
|
+
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
|
229
|
+
|
230
|
+
.cxx.S:
|
231
|
+
$(ECHO) translating $(<)
|
232
|
+
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
|
233
|
+
|
234
|
+
.cpp.o:
|
235
|
+
$(ECHO) compiling $(<)
|
236
|
+
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
|
237
|
+
|
238
|
+
.cpp.S:
|
239
|
+
$(ECHO) translating $(<)
|
240
|
+
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
|
241
|
+
|
242
|
+
.c.o:
|
243
|
+
$(ECHO) compiling $(<)
|
244
|
+
$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
|
245
|
+
|
246
|
+
.c.S:
|
247
|
+
$(ECHO) translating $(<)
|
248
|
+
$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
|
249
|
+
|
250
|
+
.m.o:
|
251
|
+
$(ECHO) compiling $(<)
|
252
|
+
$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
|
253
|
+
|
254
|
+
.m.S:
|
255
|
+
$(ECHO) translating $(<)
|
256
|
+
$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
|
257
|
+
|
258
|
+
$(TARGET_SO): $(OBJS) Makefile
|
259
|
+
$(ECHO) linking shared-object $(DLLIB)
|
260
|
+
-$(Q)$(RM) $(@)
|
261
|
+
$(Q) $(LDSHAREDXX) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
|
262
|
+
|
263
|
+
|
264
|
+
|
265
|
+
$(OBJS): $(HDRS) $(ruby_headers)
|
data/ext/cld3/base.o
ADDED
Binary file
|
Binary file
|
Binary file
|
data/ext/cld3/extconf.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright 2017 Akihiko Odaki <
|
1
|
+
# Copyright 2017 Akihiko Odaki <nekomanma@pixiv.co.jp>
|
2
2
|
# All Rights Reserved.
|
3
3
|
#
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -33,7 +33,7 @@ FileUtils.mkdir_p("cld_3/protos")
|
|
33
33
|
FileUtils.mkdir_p("script_span")
|
34
34
|
|
35
35
|
[ "feature_extractor", "sentence", "task_spec" ].each {|name|
|
36
|
-
|
36
|
+
system "protoc", "#{name}.proto", "--cpp_out=.", exception: true
|
37
37
|
ln_fallback("#{name}.pb.h", "cld_3/protos/#{name}.pb.h")
|
38
38
|
}
|
39
39
|
|
@@ -56,4 +56,5 @@ FileUtils.mkdir_p("script_span")
|
|
56
56
|
}
|
57
57
|
|
58
58
|
$CXXFLAGS += " -fvisibility=hidden -std=c++11"
|
59
|
+
$LIBRUBYARG = ""
|
59
60
|
create_makefile("libcld3")
|
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,37 @@
|
|
1
|
+
"pkg-config --exists protobuf"
|
2
|
+
| pkg-config --libs protobuf
|
3
|
+
=> "-lprotobuf -lpthread \n"
|
4
|
+
"gcc -o conftest -I/var/home/person/ruby-v_3_0_0_preview1/include/ruby-3.0.0/x86_64-linux -I/var/home/person/ruby-v_3_0_0_preview1/include/ruby-3.0.0/ruby/backward -I/var/home/person/ruby-v_3_0_0_preview1/include/ruby-3.0.0 -I. -O3 -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wduplicated-cond -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wwrite-strings -Wimplicit-fallthrough=0 -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable conftest.c -L. -L/var/home/person/ruby-v_3_0_0_preview1/lib -Wl,-rpath,/var/home/person/ruby-v_3_0_0_preview1/lib -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,-rpath,/var/home/person/ruby-v_3_0_0_preview1/lib -L/var/home/person/ruby-v_3_0_0_preview1/lib -lruby-static -lz -lpthread -lrt -lrt -ldl -lcrypt -lm -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 !!argv[argc];
|
12
|
+
6: }
|
13
|
+
/* end */
|
14
|
+
|
15
|
+
"gcc -o conftest -I/var/home/person/ruby-v_3_0_0_preview1/include/ruby-3.0.0/x86_64-linux -I/var/home/person/ruby-v_3_0_0_preview1/include/ruby-3.0.0/ruby/backward -I/var/home/person/ruby-v_3_0_0_preview1/include/ruby-3.0.0 -I. -O3 -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wduplicated-cond -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wwrite-strings -Wimplicit-fallthrough=0 -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable conftest.c -L. -L/var/home/person/ruby-v_3_0_0_preview1/lib -Wl,-rpath,/var/home/person/ruby-v_3_0_0_preview1/lib -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,-rpath,/var/home/person/ruby-v_3_0_0_preview1/lib -L/var/home/person/ruby-v_3_0_0_preview1/lib -lruby-static -lz -lpthread -lrt -lrt -ldl -lcrypt -lm -lprotobuf -lpthread -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 !!argv[argc];
|
23
|
+
6: }
|
24
|
+
/* end */
|
25
|
+
|
26
|
+
| pkg-config --cflags-only-I protobuf
|
27
|
+
=> "\n"
|
28
|
+
| pkg-config --cflags-only-other protobuf
|
29
|
+
=> "\n"
|
30
|
+
| pkg-config --libs-only-l protobuf
|
31
|
+
=> "-lprotobuf -lpthread \n"
|
32
|
+
package configuration for protobuf
|
33
|
+
incflags:
|
34
|
+
cflags:
|
35
|
+
ldflags:
|
36
|
+
libs: -lprotobuf -lpthread
|
37
|
+
|
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
|
data/lib/cld3.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# File including an implementation of CLD3 module. Some documentations are
|
2
2
|
# extracted from ext/cld3/ext/src/nnet_language_identifier.h.
|
3
3
|
#
|
4
|
-
# Copyright 2017 Akihiko Odaki <
|
4
|
+
# Copyright 2017 Akihiko Odaki <nekomanma@pixiv.co.jp>
|
5
5
|
# All Rights Reserved.
|
6
6
|
#
|
7
7
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -179,7 +179,7 @@ module CLD3
|
|
179
179
|
module Unstable
|
180
180
|
extend FFI::Library
|
181
181
|
|
182
|
-
ffi_lib File.join(
|
182
|
+
ffi_lib File.join(__dir__, "..", "ext", "cld3", "libcld3." + RbConfig::CONFIG["DLEXT"])
|
183
183
|
|
184
184
|
module NNetLanguageIdentifier
|
185
185
|
class Pointer < FFI::AutoPointer
|
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.
|
4
|
+
version: 3.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Akihiko Odaki
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-12-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: 1.1.0
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 1.
|
22
|
+
version: 1.15.0
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: 1.1.0
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: 1.
|
32
|
+
version: 1.15.0
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: rspec
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
version: 3.0.0
|
40
40
|
- - "<"
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: 3.
|
42
|
+
version: 3.11.0
|
43
43
|
type: :development
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -49,10 +49,10 @@ dependencies:
|
|
49
49
|
version: 3.0.0
|
50
50
|
- - "<"
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: 3.
|
52
|
+
version: 3.11.0
|
53
53
|
description: Compact Language Detector v3 (CLD3) is a neural network model for language
|
54
54
|
identification.
|
55
|
-
email:
|
55
|
+
email: nekomanma@pixiv.co.jp
|
56
56
|
executables: []
|
57
57
|
extensions:
|
58
58
|
- ext/cld3/extconf.rb
|
@@ -63,76 +63,108 @@ 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.def
|
110
|
+
- ext/cld3/libcld3.so
|
111
|
+
- ext/cld3/mkmf.log
|
95
112
|
- ext/cld3/nnet_language_identifier.cc
|
96
113
|
- ext/cld3/nnet_language_identifier.h
|
114
|
+
- ext/cld3/nnet_language_identifier.o
|
97
115
|
- ext/cld3/nnet_language_identifier_c.cc
|
116
|
+
- ext/cld3/nnet_language_identifier_c.o
|
98
117
|
- ext/cld3/offsetmap.cc
|
99
118
|
- ext/cld3/offsetmap.h
|
119
|
+
- ext/cld3/offsetmap.o
|
100
120
|
- ext/cld3/port.h
|
101
121
|
- ext/cld3/registry.cc
|
102
122
|
- ext/cld3/registry.h
|
123
|
+
- ext/cld3/registry.o
|
103
124
|
- ext/cld3/relevant_script_feature.cc
|
104
125
|
- ext/cld3/relevant_script_feature.h
|
126
|
+
- ext/cld3/relevant_script_feature.o
|
105
127
|
- ext/cld3/script_detector.h
|
128
|
+
- ext/cld3/sentence.pb.o
|
106
129
|
- ext/cld3/sentence.proto
|
107
130
|
- ext/cld3/sentence_features.cc
|
108
131
|
- ext/cld3/sentence_features.h
|
132
|
+
- ext/cld3/sentence_features.o
|
109
133
|
- ext/cld3/simple_adder.h
|
110
134
|
- ext/cld3/stringpiece.h
|
111
135
|
- ext/cld3/task_context.cc
|
112
136
|
- ext/cld3/task_context.h
|
137
|
+
- ext/cld3/task_context.o
|
113
138
|
- ext/cld3/task_context_params.cc
|
114
139
|
- ext/cld3/task_context_params.h
|
140
|
+
- ext/cld3/task_context_params.o
|
141
|
+
- ext/cld3/task_spec.pb.o
|
115
142
|
- ext/cld3/task_spec.proto
|
116
143
|
- ext/cld3/text_processing.cc
|
117
144
|
- ext/cld3/text_processing.h
|
145
|
+
- ext/cld3/text_processing.o
|
118
146
|
- ext/cld3/unicodetext.cc
|
119
147
|
- ext/cld3/unicodetext.h
|
148
|
+
- ext/cld3/unicodetext.o
|
120
149
|
- ext/cld3/utf8acceptinterchange.h
|
121
150
|
- ext/cld3/utf8prop_lettermarkscriptnum.h
|
122
151
|
- ext/cld3/utf8repl_lettermarklower.h
|
123
152
|
- ext/cld3/utf8scannot_lettermarkspecial.h
|
124
153
|
- ext/cld3/utf8statetable.cc
|
125
154
|
- ext/cld3/utf8statetable.h
|
155
|
+
- ext/cld3/utf8statetable.o
|
126
156
|
- ext/cld3/utils.cc
|
127
157
|
- ext/cld3/utils.h
|
158
|
+
- ext/cld3/utils.o
|
128
159
|
- ext/cld3/workspace.cc
|
129
160
|
- ext/cld3/workspace.h
|
161
|
+
- ext/cld3/workspace.o
|
130
162
|
- lib/cld3.rb
|
131
163
|
homepage: https://github.com/akihikodaki/cld3-ruby
|
132
164
|
licenses:
|
133
165
|
- Apache-2.0
|
134
166
|
metadata: {}
|
135
|
-
post_install_message:
|
167
|
+
post_install_message:
|
136
168
|
rdoc_options: []
|
137
169
|
require_paths:
|
138
170
|
- lib
|
@@ -140,18 +172,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
140
172
|
requirements:
|
141
173
|
- - ">="
|
142
174
|
- !ruby/object:Gem::Version
|
143
|
-
version: 2.
|
175
|
+
version: 2.6.0
|
144
176
|
- - "<"
|
145
177
|
- !ruby/object:Gem::Version
|
146
|
-
version:
|
178
|
+
version: 3.1.0
|
147
179
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
148
180
|
requirements:
|
149
181
|
- - ">="
|
150
182
|
- !ruby/object:Gem::Version
|
151
183
|
version: '0'
|
152
184
|
requirements: []
|
153
|
-
rubygems_version: 3.1.
|
154
|
-
signing_key:
|
185
|
+
rubygems_version: 3.1.4
|
186
|
+
signing_key:
|
155
187
|
specification_version: 4
|
156
188
|
summary: Compact Language Detector v3 (CLD3)
|
157
189
|
test_files: []
|