tomoto 0.2.2 → 0.2.3
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 +4 -4
- data/CHANGELOG.md +4 -0
- data/ext/tomoto/ct.cpp +11 -11
- data/ext/tomoto/dmr.cpp +14 -13
- data/ext/tomoto/dt.cpp +14 -14
- data/ext/tomoto/ext.cpp +7 -7
- data/ext/tomoto/extconf.rb +1 -3
- data/ext/tomoto/gdmr.cpp +7 -7
- data/ext/tomoto/hdp.cpp +9 -9
- data/ext/tomoto/hlda.cpp +13 -13
- data/ext/tomoto/hpa.cpp +5 -5
- data/ext/tomoto/lda.cpp +42 -39
- data/ext/tomoto/llda.cpp +6 -6
- data/ext/tomoto/mglda.cpp +15 -15
- data/ext/tomoto/pa.cpp +6 -6
- data/ext/tomoto/plda.cpp +6 -6
- data/ext/tomoto/slda.cpp +8 -8
- data/ext/tomoto/utils.h +16 -70
- data/lib/tomoto/version.rb +1 -1
- data/vendor/tomotopy/README.kr.rst +57 -0
- data/vendor/tomotopy/README.rst +55 -0
- data/vendor/tomotopy/src/Labeling/Phraser.hpp +3 -3
- data/vendor/tomotopy/src/TopicModel/CTModel.hpp +5 -2
- data/vendor/tomotopy/src/TopicModel/DMRModel.hpp +5 -2
- data/vendor/tomotopy/src/TopicModel/DTModel.hpp +5 -2
- data/vendor/tomotopy/src/TopicModel/HDPModel.hpp +4 -4
- data/vendor/tomotopy/src/TopicModel/HLDAModel.hpp +5 -2
- data/vendor/tomotopy/src/TopicModel/HPAModel.hpp +2 -2
- data/vendor/tomotopy/src/TopicModel/LDA.h +3 -3
- data/vendor/tomotopy/src/TopicModel/LDACVB0Model.hpp +3 -3
- data/vendor/tomotopy/src/TopicModel/LDAModel.hpp +34 -14
- data/vendor/tomotopy/src/TopicModel/LLDAModel.hpp +5 -2
- data/vendor/tomotopy/src/TopicModel/MGLDAModel.hpp +2 -2
- data/vendor/tomotopy/src/TopicModel/PAModel.hpp +1 -1
- data/vendor/tomotopy/src/TopicModel/PLDAModel.hpp +5 -2
- data/vendor/tomotopy/src/TopicModel/PTModel.hpp +5 -2
- data/vendor/tomotopy/src/TopicModel/SLDAModel.hpp +4 -1
- data/vendor/tomotopy/src/TopicModel/TopicModel.hpp +48 -21
- data/vendor/tomotopy/src/Utils/AliasMethod.hpp +5 -4
- data/vendor/tomotopy/src/Utils/Dictionary.h +2 -2
- data/vendor/tomotopy/src/Utils/MultiNormalDistribution.hpp +1 -1
- data/vendor/tomotopy/src/Utils/TruncMultiNormal.hpp +1 -1
- data/vendor/tomotopy/src/Utils/math.h +2 -2
- data/vendor/tomotopy/src/Utils/serializer.hpp +30 -5
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a68366fa033b16f1a3c5ce77d1c62cd523dda6f873fb24cf25619706a7a0086f
|
4
|
+
data.tar.gz: 347f7c8c8cce63da9b5f922267123811bc1333ebdb685bbbb10b906fda24eeee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 72adc8f9e3fe3e9d04e3841d4ff9386d3f2bef710adaa0fa2e0406284eb814cff55e0603e3b3c3b344893011dc20ab9d17de68fbaceff48c73fc9b6e506971e2
|
7
|
+
data.tar.gz: 6ec20a814092d056917b5f1b455019a676f8ac54161c3a0f487670dbbba5ae8dbdf6ab634c17c4770ccbdbcd4be9b12304ccc92f6ed0279ee48eb2fe36a035c9
|
data/CHANGELOG.md
CHANGED
data/ext/tomoto/ct.cpp
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
#include <CT.h>
|
2
2
|
|
3
|
-
#include <rice/
|
3
|
+
#include <rice/rice.hpp>
|
4
4
|
|
5
5
|
#include "utils.h"
|
6
6
|
|
7
7
|
void init_ct(Rice::Module& m) {
|
8
8
|
Rice::define_class_under<tomoto::ICTModel, tomoto::ILDAModel>(m, "CT")
|
9
|
-
.
|
9
|
+
.define_singleton_function(
|
10
10
|
"_new",
|
11
|
-
|
11
|
+
[](size_t tw, size_t k, tomoto::Float alpha, tomoto::Float eta, size_t seed) {
|
12
12
|
tomoto::CTArgs args;
|
13
13
|
args.k = k;
|
14
14
|
args.alpha = {alpha};
|
@@ -17,42 +17,42 @@ void init_ct(Rice::Module& m) {
|
|
17
17
|
args.seed = seed;
|
18
18
|
}
|
19
19
|
return tomoto::ICTModel::create((tomoto::TermWeight)tw, args);
|
20
|
-
})
|
20
|
+
}, Rice::Return().takeOwnership())
|
21
21
|
.define_method(
|
22
22
|
"_correlations",
|
23
|
-
|
23
|
+
[](tomoto::ICTModel& self, tomoto::Tid topic_id) {
|
24
24
|
return self.getCorrelationTopic(topic_id);
|
25
25
|
})
|
26
26
|
.define_method(
|
27
27
|
"num_beta_sample",
|
28
|
-
|
28
|
+
[](tomoto::ICTModel& self) {
|
29
29
|
return self.getNumBetaSample();
|
30
30
|
})
|
31
31
|
.define_method(
|
32
32
|
"num_beta_sample=",
|
33
|
-
|
33
|
+
[](tomoto::ICTModel& self, size_t value) {
|
34
34
|
self.setNumBetaSample(value);
|
35
35
|
return value;
|
36
36
|
})
|
37
37
|
.define_method(
|
38
38
|
"num_tmn_sample",
|
39
|
-
|
39
|
+
[](tomoto::ICTModel& self) {
|
40
40
|
return self.getNumTMNSample();
|
41
41
|
})
|
42
42
|
.define_method(
|
43
43
|
"num_tmn_sample=",
|
44
|
-
|
44
|
+
[](tomoto::ICTModel& self, size_t value) {
|
45
45
|
self.setNumTMNSample(value);
|
46
46
|
return value;
|
47
47
|
})
|
48
48
|
.define_method(
|
49
49
|
"_prior_cov",
|
50
|
-
|
50
|
+
[](tomoto::ICTModel& self) {
|
51
51
|
return self.getPriorCov();
|
52
52
|
})
|
53
53
|
.define_method(
|
54
54
|
"prior_mean",
|
55
|
-
|
55
|
+
[](tomoto::ICTModel& self) {
|
56
56
|
return self.getPriorMean();
|
57
57
|
});
|
58
58
|
}
|
data/ext/tomoto/dmr.cpp
CHANGED
@@ -1,15 +1,14 @@
|
|
1
1
|
#include <DMR.h>
|
2
2
|
|
3
|
-
#include <rice/
|
4
|
-
#include <rice/Module.hpp>
|
3
|
+
#include <rice/rice.hpp>
|
5
4
|
|
6
5
|
#include "utils.h"
|
7
6
|
|
8
7
|
void init_dmr(Rice::Module& m) {
|
9
8
|
Rice::define_class_under<tomoto::IDMRModel, tomoto::ILDAModel>(m, "DMR")
|
10
|
-
.
|
9
|
+
.define_singleton_function(
|
11
10
|
"_new",
|
12
|
-
|
11
|
+
[](size_t tw, size_t k, tomoto::Float alpha, tomoto::Float sigma, tomoto::Float eta, tomoto::Float alpha_epsilon, size_t seed) {
|
13
12
|
tomoto::DMRArgs args;
|
14
13
|
args.k = k;
|
15
14
|
args.alpha = {alpha};
|
@@ -20,49 +19,51 @@ void init_dmr(Rice::Module& m) {
|
|
20
19
|
args.seed = seed;
|
21
20
|
}
|
22
21
|
return tomoto::IDMRModel::create((tomoto::TermWeight)tw, args);
|
23
|
-
})
|
22
|
+
}, Rice::Return().takeOwnership())
|
24
23
|
.define_method(
|
25
24
|
"_add_doc",
|
26
|
-
|
25
|
+
[](tomoto::IDMRModel& self, std::vector<std::string> words, std::string metadata) {
|
27
26
|
auto doc = buildDoc(words);
|
28
27
|
doc.misc["metadata"] = metadata;
|
29
28
|
return self.addDoc(doc);
|
30
29
|
})
|
31
30
|
.define_method(
|
32
31
|
"alpha_epsilon",
|
33
|
-
|
32
|
+
[](tomoto::IDMRModel& self) {
|
34
33
|
return self.getAlphaEps();
|
35
34
|
})
|
36
35
|
.define_method(
|
37
36
|
"alpha_epsilon=",
|
38
|
-
|
37
|
+
[](tomoto::IDMRModel& self, tomoto::Float value) {
|
39
38
|
self.setAlphaEps(value);
|
40
39
|
return value;
|
41
40
|
})
|
42
41
|
.define_method(
|
43
42
|
"f",
|
44
|
-
|
43
|
+
[](tomoto::IDMRModel& self) {
|
45
44
|
return self.getF();
|
46
45
|
})
|
47
46
|
.define_method(
|
48
47
|
"_lambdas",
|
49
|
-
|
48
|
+
[](tomoto::IDMRModel& self, tomoto::Tid topic_id) {
|
50
49
|
return self.getLambdaByTopic(topic_id);
|
51
50
|
})
|
52
51
|
.define_method(
|
53
52
|
"metadata_dict",
|
54
|
-
|
53
|
+
[](tomoto::IDMRModel& self) {
|
55
54
|
auto dict = self.getMetadataDict();
|
56
55
|
Array res;
|
57
56
|
auto utf8 = Rice::Class(rb_cEncoding).call("const_get", "UTF_8");
|
58
57
|
for (size_t i = 0; i < dict.size(); i++) {
|
59
|
-
|
58
|
+
VALUE value = Rice::detail::To_Ruby<std::string>().convert(dict.toWord(i));
|
59
|
+
Object obj(value);
|
60
|
+
res.push(obj.call("force_encoding", utf8));
|
60
61
|
}
|
61
62
|
return res;
|
62
63
|
})
|
63
64
|
.define_method(
|
64
65
|
"sigma",
|
65
|
-
|
66
|
+
[](tomoto::IDMRModel& self) {
|
66
67
|
return self.getSigma();
|
67
68
|
});
|
68
69
|
}
|
data/ext/tomoto/dt.cpp
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
#include <DT.h>
|
2
2
|
|
3
|
-
#include <rice/
|
3
|
+
#include <rice/rice.hpp>
|
4
4
|
|
5
5
|
#include "utils.h"
|
6
6
|
|
7
7
|
void init_dt(Rice::Module& m) {
|
8
8
|
Rice::define_class_under<tomoto::IDTModel, tomoto::ILDAModel>(m, "DT")
|
9
|
-
.
|
9
|
+
.define_singleton_function(
|
10
10
|
"_new",
|
11
|
-
|
11
|
+
[](size_t tw, size_t k, size_t t, tomoto::Float alphaVar, tomoto::Float etaVar, tomoto::Float phiVar, tomoto::Float shapeA, tomoto::Float shapeB, tomoto::Float shapeC) {
|
12
12
|
// Rice only supports 10 arguments
|
13
13
|
size_t seed = -1;
|
14
14
|
tomoto::DTArgs args;
|
@@ -24,17 +24,17 @@ void init_dt(Rice::Module& m) {
|
|
24
24
|
args.seed = seed;
|
25
25
|
}
|
26
26
|
return tomoto::IDTModel::create((tomoto::TermWeight)tw, args);
|
27
|
-
})
|
27
|
+
}, Rice::Return().takeOwnership())
|
28
28
|
.define_method(
|
29
29
|
"_add_doc",
|
30
|
-
|
30
|
+
[](tomoto::IDTModel& self, std::vector<std::string> words, uint32_t timepoint) {
|
31
31
|
auto doc = buildDoc(words);
|
32
32
|
doc.misc["timepoint"] = timepoint;
|
33
33
|
return self.addDoc(doc);
|
34
34
|
})
|
35
35
|
.define_method(
|
36
36
|
"alpha",
|
37
|
-
|
37
|
+
[](tomoto::IDTModel& self) {
|
38
38
|
Array res;
|
39
39
|
for (size_t i = 0; i < self.getK(); i++) {
|
40
40
|
Array res2;
|
@@ -47,45 +47,45 @@ void init_dt(Rice::Module& m) {
|
|
47
47
|
})
|
48
48
|
.define_method(
|
49
49
|
"lr_a",
|
50
|
-
|
50
|
+
[](tomoto::IDTModel& self) {
|
51
51
|
return self.getShapeA();
|
52
52
|
})
|
53
53
|
.define_method(
|
54
54
|
"lr_a=",
|
55
|
-
|
55
|
+
[](tomoto::IDTModel& self, tomoto::Float value) {
|
56
56
|
self.setShapeA(value);
|
57
57
|
return value;
|
58
58
|
})
|
59
59
|
.define_method(
|
60
60
|
"lr_b",
|
61
|
-
|
61
|
+
[](tomoto::IDTModel& self) {
|
62
62
|
return self.getShapeB();
|
63
63
|
})
|
64
64
|
.define_method(
|
65
65
|
"lr_b=",
|
66
|
-
|
66
|
+
[](tomoto::IDTModel& self, tomoto::Float value) {
|
67
67
|
self.setShapeB(value);
|
68
68
|
return value;
|
69
69
|
})
|
70
70
|
.define_method(
|
71
71
|
"lr_c",
|
72
|
-
|
72
|
+
[](tomoto::IDTModel& self) {
|
73
73
|
return self.getShapeC();
|
74
74
|
})
|
75
75
|
.define_method(
|
76
76
|
"lr_c=",
|
77
|
-
|
77
|
+
[](tomoto::IDTModel& self, tomoto::Float value) {
|
78
78
|
self.setShapeC(value);
|
79
79
|
return value;
|
80
80
|
})
|
81
81
|
.define_method(
|
82
82
|
"num_docs_by_timepoint",
|
83
|
-
|
83
|
+
[](tomoto::IDTModel& self) {
|
84
84
|
return self.getNumDocsByT();
|
85
85
|
})
|
86
86
|
.define_method(
|
87
87
|
"num_timepoints",
|
88
|
-
|
88
|
+
[](tomoto::IDTModel& self) {
|
89
89
|
return self.getT();
|
90
90
|
});
|
91
91
|
}
|
data/ext/tomoto/ext.cpp
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#include <rice/
|
1
|
+
#include <rice/rice.hpp>
|
2
2
|
|
3
3
|
void init_lda(Rice::Module& m);
|
4
4
|
void init_ct(Rice::Module& m);
|
@@ -18,17 +18,17 @@ extern "C"
|
|
18
18
|
void Init_ext()
|
19
19
|
{
|
20
20
|
auto m = Rice::define_module("Tomoto")
|
21
|
-
.
|
21
|
+
.define_singleton_function(
|
22
22
|
"isa",
|
23
|
-
|
23
|
+
[]() {
|
24
24
|
#ifdef __AVX2__
|
25
|
-
return "avx2";
|
25
|
+
return Rice::String("avx2");
|
26
26
|
#elif defined(__AVX__)
|
27
|
-
return "avx";
|
27
|
+
return Rice::String("avx");
|
28
28
|
#elif defined(__SSE2__) || defined(__x86_64__) || defined(_WIN64)
|
29
|
-
return "sse2";
|
29
|
+
return Rice::String("sse2");
|
30
30
|
#else
|
31
|
-
return "none";
|
31
|
+
return Rice::String("none");
|
32
32
|
#endif
|
33
33
|
});
|
34
34
|
|
data/ext/tomoto/extconf.rb
CHANGED
data/ext/tomoto/gdmr.cpp
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
#include <GDMR.h>
|
2
2
|
|
3
|
-
#include <rice/
|
3
|
+
#include <rice/rice.hpp>
|
4
4
|
|
5
5
|
#include "utils.h"
|
6
6
|
|
7
7
|
void init_gdmr(Rice::Module& m) {
|
8
8
|
Rice::define_class_under<tomoto::IGDMRModel, tomoto::IDMRModel>(m, "GDMR")
|
9
|
-
.
|
9
|
+
.define_singleton_function(
|
10
10
|
"_new",
|
11
|
-
|
11
|
+
[](size_t tw, size_t k, std::vector<uint64_t> degrees, tomoto::Float alpha, tomoto::Float sigma, tomoto::Float sigma0, tomoto::Float eta, tomoto::Float alpha_epsilon, size_t seed) {
|
12
12
|
tomoto::GDMRArgs args;
|
13
13
|
args.k = k;
|
14
14
|
args.degrees = degrees;
|
@@ -21,22 +21,22 @@ void init_gdmr(Rice::Module& m) {
|
|
21
21
|
args.seed = seed;
|
22
22
|
}
|
23
23
|
return tomoto::IGDMRModel::create((tomoto::TermWeight)tw, args);
|
24
|
-
})
|
24
|
+
}, Rice::Return().takeOwnership())
|
25
25
|
.define_method(
|
26
26
|
"_add_doc",
|
27
|
-
|
27
|
+
[](tomoto::IGDMRModel& self, std::vector<std::string> words, std::vector<tomoto::Float> numeric_metadata) {
|
28
28
|
auto doc = buildDoc(words);
|
29
29
|
doc.misc["numeric_metadata"] = numeric_metadata;
|
30
30
|
return self.addDoc(doc);
|
31
31
|
})
|
32
32
|
.define_method(
|
33
33
|
"degrees",
|
34
|
-
|
34
|
+
[](tomoto::IGDMRModel& self) {
|
35
35
|
return self.getFs();
|
36
36
|
})
|
37
37
|
.define_method(
|
38
38
|
"sigma0",
|
39
|
-
|
39
|
+
[](tomoto::IGDMRModel& self) {
|
40
40
|
return self.getSigma0();
|
41
41
|
});
|
42
42
|
}
|
data/ext/tomoto/hdp.cpp
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
#include <HDP.h>
|
2
2
|
|
3
|
-
#include <rice/
|
3
|
+
#include <rice/rice.hpp>
|
4
4
|
|
5
5
|
#include "utils.h"
|
6
6
|
|
7
7
|
void init_hdp(Rice::Module& m) {
|
8
8
|
Rice::define_class_under<tomoto::IHDPModel, tomoto::ILDAModel>(m, "HDP")
|
9
|
-
.
|
9
|
+
.define_singleton_function(
|
10
10
|
"_new",
|
11
|
-
|
11
|
+
[](size_t tw, size_t k, tomoto::Float alpha, tomoto::Float eta, tomoto::Float gamma, size_t seed) {
|
12
12
|
tomoto::HDPArgs args;
|
13
13
|
args.k = k;
|
14
14
|
args.alpha = {alpha};
|
@@ -18,30 +18,30 @@ void init_hdp(Rice::Module& m) {
|
|
18
18
|
args.seed = seed;
|
19
19
|
}
|
20
20
|
return tomoto::IHDPModel::create((tomoto::TermWeight)tw, args);
|
21
|
-
})
|
21
|
+
}, Rice::Return().takeOwnership())
|
22
22
|
.define_method(
|
23
23
|
"alpha",
|
24
|
-
|
24
|
+
[](tomoto::IHDPModel& self) {
|
25
25
|
return self.getAlpha();
|
26
26
|
})
|
27
27
|
.define_method(
|
28
28
|
"gamma",
|
29
|
-
|
29
|
+
[](tomoto::IHDPModel& self) {
|
30
30
|
return self.getGamma();
|
31
31
|
})
|
32
32
|
.define_method(
|
33
33
|
"live_k",
|
34
|
-
|
34
|
+
[](tomoto::IHDPModel& self) {
|
35
35
|
return self.getLiveK();
|
36
36
|
})
|
37
37
|
.define_method(
|
38
38
|
"live_topic?",
|
39
|
-
|
39
|
+
[](tomoto::IHDPModel& self, size_t tid) {
|
40
40
|
return self.isLiveTopic(tid);
|
41
41
|
})
|
42
42
|
.define_method(
|
43
43
|
"num_tables",
|
44
|
-
|
44
|
+
[](tomoto::IHDPModel& self) {
|
45
45
|
return self.getTotalTables();
|
46
46
|
});
|
47
47
|
}
|
data/ext/tomoto/hlda.cpp
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
#include <HLDA.h>
|
2
2
|
|
3
|
-
#include <rice/
|
3
|
+
#include <rice/rice.hpp>
|
4
4
|
|
5
5
|
#include "utils.h"
|
6
6
|
|
7
7
|
void init_hlda(Rice::Module& m) {
|
8
8
|
Rice::define_class_under<tomoto::IHLDAModel, tomoto::ILDAModel>(m, "HLDA")
|
9
|
-
.
|
9
|
+
.define_singleton_function(
|
10
10
|
"_new",
|
11
|
-
|
11
|
+
[](size_t tw, size_t levelDepth, tomoto::Float alpha, tomoto::Float eta, tomoto::Float gamma, size_t seed) {
|
12
12
|
tomoto::HLDAArgs args;
|
13
13
|
args.k = levelDepth;
|
14
14
|
args.alpha = {alpha};
|
@@ -18,10 +18,10 @@ void init_hlda(Rice::Module& m) {
|
|
18
18
|
args.seed = seed;
|
19
19
|
}
|
20
20
|
return tomoto::IHLDAModel::create((tomoto::TermWeight)tw, args);
|
21
|
-
})
|
21
|
+
}, Rice::Return().takeOwnership())
|
22
22
|
.define_method(
|
23
23
|
"alpha",
|
24
|
-
|
24
|
+
[](tomoto::IHLDAModel& self) {
|
25
25
|
Array res;
|
26
26
|
for (size_t i = 0; i < self.getLevelDepth(); i++) {
|
27
27
|
res.push(self.getAlpha(i));
|
@@ -30,42 +30,42 @@ void init_hlda(Rice::Module& m) {
|
|
30
30
|
})
|
31
31
|
.define_method(
|
32
32
|
"_children_topics",
|
33
|
-
|
33
|
+
[](tomoto::IHLDAModel& self, tomoto::Tid topic_id) {
|
34
34
|
return self.getChildTopicId(topic_id);
|
35
35
|
})
|
36
36
|
.define_method(
|
37
37
|
"depth",
|
38
|
-
|
38
|
+
[](tomoto::IHLDAModel& self) {
|
39
39
|
return self.getLevelDepth();
|
40
40
|
})
|
41
41
|
.define_method(
|
42
42
|
"gamma",
|
43
|
-
|
43
|
+
[](tomoto::IHLDAModel& self) {
|
44
44
|
return self.getGamma();
|
45
45
|
})
|
46
46
|
.define_method(
|
47
47
|
"_level",
|
48
|
-
|
48
|
+
[](tomoto::IHLDAModel& self, tomoto::Tid topic_id) {
|
49
49
|
return self.getLevelOfTopic(topic_id);
|
50
50
|
})
|
51
51
|
.define_method(
|
52
52
|
"live_k",
|
53
|
-
|
53
|
+
[](tomoto::IHLDAModel& self) {
|
54
54
|
return self.getLiveK();
|
55
55
|
})
|
56
56
|
.define_method(
|
57
57
|
"_live_topic?",
|
58
|
-
|
58
|
+
[](tomoto::IHLDAModel& self, tomoto::Tid topic_id) {
|
59
59
|
return self.isLiveTopic(topic_id);
|
60
60
|
})
|
61
61
|
.define_method(
|
62
62
|
"_num_docs_of_topic",
|
63
|
-
|
63
|
+
[](tomoto::IHLDAModel& self, tomoto::Tid topic_id) {
|
64
64
|
return self.getNumDocsOfTopic(topic_id);
|
65
65
|
})
|
66
66
|
.define_method(
|
67
67
|
"_parent_topic",
|
68
|
-
|
68
|
+
[](tomoto::IHLDAModel& self, tomoto::Tid topic_id) {
|
69
69
|
return self.getParentTopicId(topic_id);
|
70
70
|
});
|
71
71
|
}
|