lda-ruby 0.5.0-x64-mingw-ucrt
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/CHANGELOG.md +69 -0
- data/Gemfile +9 -0
- data/README.md +160 -0
- data/VERSION.yml +5 -0
- data/docs/modernization-handoff.md +233 -0
- data/docs/porting-strategy.md +148 -0
- data/docs/precompiled-platform-policy.md +81 -0
- data/docs/precompiled-target-evaluation.md +67 -0
- data/docs/release-runbook.md +192 -0
- data/docs/rust-orchestration-guardrails.md +50 -0
- data/ext/lda-ruby/cokus.c +144 -0
- data/ext/lda-ruby/cokus.h +27 -0
- data/ext/lda-ruby/extconf.rb +13 -0
- data/ext/lda-ruby/lda-alpha.c +96 -0
- data/ext/lda-ruby/lda-alpha.h +21 -0
- data/ext/lda-ruby/lda-data.c +67 -0
- data/ext/lda-ruby/lda-data.h +14 -0
- data/ext/lda-ruby/lda-inference.c +1023 -0
- data/ext/lda-ruby/lda-inference.h +63 -0
- data/ext/lda-ruby/lda-model.c +345 -0
- data/ext/lda-ruby/lda-model.h +31 -0
- data/ext/lda-ruby/lda-x64-mingw-ucrt.def +2 -0
- data/ext/lda-ruby/lda.h +54 -0
- data/ext/lda-ruby/utils.c +119 -0
- data/ext/lda-ruby/utils.h +18 -0
- data/ext/lda-ruby-rust/Cargo.toml +12 -0
- data/ext/lda-ruby-rust/README.md +73 -0
- data/ext/lda-ruby-rust/extconf.rb +135 -0
- data/ext/lda-ruby-rust/include/strings.h +35 -0
- data/ext/lda-ruby-rust/src/lib.rs +1263 -0
- data/lda-ruby.gemspec +78 -0
- data/lib/lda-ruby/backends/base.rb +133 -0
- data/lib/lda-ruby/backends/native.rb +158 -0
- data/lib/lda-ruby/backends/pure_ruby.rb +675 -0
- data/lib/lda-ruby/backends/rust.rb +607 -0
- data/lib/lda-ruby/backends.rb +58 -0
- data/lib/lda-ruby/config/stopwords.yml +571 -0
- data/lib/lda-ruby/corpus/corpus.rb +45 -0
- data/lib/lda-ruby/corpus/data_corpus.rb +22 -0
- data/lib/lda-ruby/corpus/directory_corpus.rb +25 -0
- data/lib/lda-ruby/corpus/text_corpus.rb +27 -0
- data/lib/lda-ruby/document/data_document.rb +30 -0
- data/lib/lda-ruby/document/document.rb +40 -0
- data/lib/lda-ruby/document/text_document.rb +39 -0
- data/lib/lda-ruby/lda.so +0 -0
- data/lib/lda-ruby/rust_build_policy.rb +21 -0
- data/lib/lda-ruby/version.rb +5 -0
- data/lib/lda-ruby/vocabulary.rb +46 -0
- data/lib/lda-ruby.rb +413 -0
- data/lib/lda_ruby_rust.so +0 -0
- data/license.txt +504 -0
- data/test/backend_compatibility_test.rb +146 -0
- data/test/backends_selection_test.rb +100 -0
- data/test/benchmark_scripts_test.rb +23 -0
- data/test/data/docs.dat +46 -0
- data/test/data/sample.rb +20 -0
- data/test/data/wiki-test-docs.yml +123 -0
- data/test/gemspec_test.rb +27 -0
- data/test/lda_ruby_test.rb +319 -0
- data/test/packaged_gem_smoke_test.rb +33 -0
- data/test/pure_ruby_orchestration_test.rb +109 -0
- data/test/release_scripts_test.rb +93 -0
- data/test/rust_build_policy_test.rb +23 -0
- data/test/rust_orchestration_test.rb +911 -0
- data/test/simple_pipeline_test.rb +22 -0
- data/test/simple_yaml.rb +17 -0
- data/test/test_helper.rb +10 -0
- metadata +118 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
require_relative "test_helper"
|
|
2
|
+
|
|
3
|
+
class SimplePipelineTest < Test::Unit::TestCase
|
|
4
|
+
def test_end_to_end_pipeline_on_small_corpus
|
|
5
|
+
corpus = Lda::Corpus.new
|
|
6
|
+
document1 = Lda::TextDocument.new(corpus, "Dom Cobb is a skilled thief who steals secrets from dreams.")
|
|
7
|
+
document2 = Lda::TextDocument.new(corpus, "Jake Sully joins the mission on Pandora and learns from the Na'vi.")
|
|
8
|
+
|
|
9
|
+
corpus.add_document(document1)
|
|
10
|
+
corpus.add_document(document2)
|
|
11
|
+
corpus.remove_word("cobb")
|
|
12
|
+
|
|
13
|
+
lda = Lda::Lda.new(corpus)
|
|
14
|
+
lda.verbose = false
|
|
15
|
+
lda.num_topics = 2
|
|
16
|
+
lda.em("random")
|
|
17
|
+
|
|
18
|
+
topics = lda.top_words(5)
|
|
19
|
+
assert_equal 2, topics.size
|
|
20
|
+
topics.each_value { |words| assert_equal 5, words.size }
|
|
21
|
+
end
|
|
22
|
+
end
|
data/test/simple_yaml.rb
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
require_relative "test_helper"
|
|
2
|
+
|
|
3
|
+
class Test::Unit::TestCase
|
|
4
|
+
|
|
5
|
+
@filename = File.join(File.dirname(__FILE__), 'data', 'wiki-test-docs.yml')
|
|
6
|
+
@filedocs = YAML::load_file(@filename)
|
|
7
|
+
@corpus = Lda::TextCorpus.new(@filename)
|
|
8
|
+
|
|
9
|
+
@lda = Lda::Lda.new(@corpus)
|
|
10
|
+
|
|
11
|
+
@lda.verbose = false
|
|
12
|
+
@lda.num_topics = 20
|
|
13
|
+
@lda.em('random')
|
|
14
|
+
@lda.print_topics(20)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
end
|
data/test/test_helper.rb
ADDED
metadata
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: lda-ruby
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.5.0
|
|
5
|
+
platform: x64-mingw-ucrt
|
|
6
|
+
authors:
|
|
7
|
+
- David Blei
|
|
8
|
+
- Jason Adams
|
|
9
|
+
- Rio Akasaka
|
|
10
|
+
autorequire:
|
|
11
|
+
bindir: bin
|
|
12
|
+
cert_chain: []
|
|
13
|
+
date: 2026-05-04 00:00:00.000000000 Z
|
|
14
|
+
dependencies: []
|
|
15
|
+
description: Ruby wrapper and toolkit for Latent Dirichlet Allocation based on the
|
|
16
|
+
original lda-c implementation by David M. Blei.
|
|
17
|
+
email:
|
|
18
|
+
- jasonmadams@gmail.com
|
|
19
|
+
executables: []
|
|
20
|
+
extensions: []
|
|
21
|
+
extra_rdoc_files: []
|
|
22
|
+
files:
|
|
23
|
+
- CHANGELOG.md
|
|
24
|
+
- Gemfile
|
|
25
|
+
- README.md
|
|
26
|
+
- VERSION.yml
|
|
27
|
+
- docs/modernization-handoff.md
|
|
28
|
+
- docs/porting-strategy.md
|
|
29
|
+
- docs/precompiled-platform-policy.md
|
|
30
|
+
- docs/precompiled-target-evaluation.md
|
|
31
|
+
- docs/release-runbook.md
|
|
32
|
+
- docs/rust-orchestration-guardrails.md
|
|
33
|
+
- ext/lda-ruby-rust/Cargo.toml
|
|
34
|
+
- ext/lda-ruby-rust/README.md
|
|
35
|
+
- ext/lda-ruby-rust/extconf.rb
|
|
36
|
+
- ext/lda-ruby-rust/include/strings.h
|
|
37
|
+
- ext/lda-ruby-rust/src/lib.rs
|
|
38
|
+
- ext/lda-ruby/cokus.c
|
|
39
|
+
- ext/lda-ruby/cokus.h
|
|
40
|
+
- ext/lda-ruby/extconf.rb
|
|
41
|
+
- ext/lda-ruby/lda-alpha.c
|
|
42
|
+
- ext/lda-ruby/lda-alpha.h
|
|
43
|
+
- ext/lda-ruby/lda-data.c
|
|
44
|
+
- ext/lda-ruby/lda-data.h
|
|
45
|
+
- ext/lda-ruby/lda-inference.c
|
|
46
|
+
- ext/lda-ruby/lda-inference.h
|
|
47
|
+
- ext/lda-ruby/lda-model.c
|
|
48
|
+
- ext/lda-ruby/lda-model.h
|
|
49
|
+
- ext/lda-ruby/lda-x64-mingw-ucrt.def
|
|
50
|
+
- ext/lda-ruby/lda.h
|
|
51
|
+
- ext/lda-ruby/utils.c
|
|
52
|
+
- ext/lda-ruby/utils.h
|
|
53
|
+
- lda-ruby.gemspec
|
|
54
|
+
- lib/lda-ruby.rb
|
|
55
|
+
- lib/lda-ruby/backends.rb
|
|
56
|
+
- lib/lda-ruby/backends/base.rb
|
|
57
|
+
- lib/lda-ruby/backends/native.rb
|
|
58
|
+
- lib/lda-ruby/backends/pure_ruby.rb
|
|
59
|
+
- lib/lda-ruby/backends/rust.rb
|
|
60
|
+
- lib/lda-ruby/config/stopwords.yml
|
|
61
|
+
- lib/lda-ruby/corpus/corpus.rb
|
|
62
|
+
- lib/lda-ruby/corpus/data_corpus.rb
|
|
63
|
+
- lib/lda-ruby/corpus/directory_corpus.rb
|
|
64
|
+
- lib/lda-ruby/corpus/text_corpus.rb
|
|
65
|
+
- lib/lda-ruby/document/data_document.rb
|
|
66
|
+
- lib/lda-ruby/document/document.rb
|
|
67
|
+
- lib/lda-ruby/document/text_document.rb
|
|
68
|
+
- lib/lda-ruby/lda.so
|
|
69
|
+
- lib/lda-ruby/rust_build_policy.rb
|
|
70
|
+
- lib/lda-ruby/version.rb
|
|
71
|
+
- lib/lda-ruby/vocabulary.rb
|
|
72
|
+
- lib/lda_ruby_rust.so
|
|
73
|
+
- license.txt
|
|
74
|
+
- test/backend_compatibility_test.rb
|
|
75
|
+
- test/backends_selection_test.rb
|
|
76
|
+
- test/benchmark_scripts_test.rb
|
|
77
|
+
- test/data/docs.dat
|
|
78
|
+
- test/data/sample.rb
|
|
79
|
+
- test/data/wiki-test-docs.yml
|
|
80
|
+
- test/gemspec_test.rb
|
|
81
|
+
- test/lda_ruby_test.rb
|
|
82
|
+
- test/packaged_gem_smoke_test.rb
|
|
83
|
+
- test/pure_ruby_orchestration_test.rb
|
|
84
|
+
- test/release_scripts_test.rb
|
|
85
|
+
- test/rust_build_policy_test.rb
|
|
86
|
+
- test/rust_orchestration_test.rb
|
|
87
|
+
- test/simple_pipeline_test.rb
|
|
88
|
+
- test/simple_yaml.rb
|
|
89
|
+
- test/test_helper.rb
|
|
90
|
+
homepage: https://github.com/ealdent/lda-ruby
|
|
91
|
+
licenses:
|
|
92
|
+
- GPL-2.0-or-later
|
|
93
|
+
metadata:
|
|
94
|
+
homepage_uri: https://github.com/ealdent/lda-ruby
|
|
95
|
+
source_code_uri: https://github.com/ealdent/lda-ruby
|
|
96
|
+
changelog_uri: https://github.com/ealdent/lda-ruby/blob/master/CHANGELOG.md
|
|
97
|
+
lda_ruby_gem_variant: precompiled
|
|
98
|
+
lda_ruby_platform: x64-mingw-ucrt
|
|
99
|
+
post_install_message:
|
|
100
|
+
rdoc_options: []
|
|
101
|
+
require_paths:
|
|
102
|
+
- lib
|
|
103
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
104
|
+
requirements:
|
|
105
|
+
- - ">="
|
|
106
|
+
- !ruby/object:Gem::Version
|
|
107
|
+
version: '3.2'
|
|
108
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
109
|
+
requirements:
|
|
110
|
+
- - ">="
|
|
111
|
+
- !ruby/object:Gem::Version
|
|
112
|
+
version: '0'
|
|
113
|
+
requirements: []
|
|
114
|
+
rubygems_version: 3.5.22
|
|
115
|
+
signing_key:
|
|
116
|
+
specification_version: 4
|
|
117
|
+
summary: Ruby implementation of Latent Dirichlet Allocation (LDA).
|
|
118
|
+
test_files: []
|