summaryrefslogtreecommitdiff
path: root/python/src/mteval.pxd
diff options
context:
space:
mode:
authorVictor Chahuneau <vchahune@cs.cmu.edu>2012-07-27 22:25:15 -0400
committerVictor Chahuneau <vchahune@cs.cmu.edu>2012-07-27 22:25:15 -0400
commit9961abf8f756279ac6d839e0b3de2b0d83431965 (patch)
tree2defad3f49df2921ff68a48a07a9ca0693a1f0f7 /python/src/mteval.pxd
parent733e1b1507d27d4f53055f740e8098f56215ab8f (diff)
[python] conversion from cdec.sa.Rule to cdec.TRule
+ remove configobj dependency + re-structure packages (no more top-level library) + "const" stuff + use __new__ instead of constructor for some objects
Diffstat (limited to 'python/src/mteval.pxd')
-rw-r--r--python/src/mteval.pxd6
1 files changed, 4 insertions, 2 deletions
diff --git a/python/src/mteval.pxd b/python/src/mteval.pxd
index 27c2808d..c97c4b34 100644
--- a/python/src/mteval.pxd
+++ b/python/src/mteval.pxd
@@ -38,15 +38,17 @@ cdef extern from "py_scorer.h":
string& metric_id, void*, MetricStatsCallback, MetricScoreCallback)
cdef extern from "training/candidate_set.h" namespace "training":
- cdef cppclass Candidate "const training::Candidate":
+ cdef cppclass Candidate:
vector[WordID] ewords
FastSparseVector[weight_t] fmap
SufficientStats eval_feats
+ ctypedef Candidate const_Candidate "const training::Candidate"
+
cdef cppclass CandidateSet:
CandidateSet()
unsigned size()
- Candidate& operator[](unsigned i)
+ const_Candidate& operator[](unsigned i)
void ReadFromFile(string& file)
void WriteToFile(string& file)
void AddKBestCandidates(Hypergraph& hg,