summaryrefslogtreecommitdiff
path: root/python/src/sa/features.pxi
diff options
context:
space:
mode:
authorVictor Chahuneau <vchahune@cs.cmu.edu>2012-09-05 14:55:11 +0100
committerVictor Chahuneau <vchahune@cs.cmu.edu>2012-09-05 14:55:11 +0100
commit6fb3cc36cc4113c9f3510d87b3ae3b9c9351bf4e (patch)
treeae29f2c831037665ec39e24df0cdf2657dfadc5e /python/src/sa/features.pxi
parent1fd5b40da3bc9c55fd2fba03bb7fdb43eabee63c (diff)
Expose new feature extraction API
Diffstat (limited to 'python/src/sa/features.pxi')
-rw-r--r--python/src/sa/features.pxi6
1 files changed, 3 insertions, 3 deletions
diff --git a/python/src/sa/features.pxi b/python/src/sa/features.pxi
index eeef4feb..9b9ecf3c 100644
--- a/python/src/sa/features.pxi
+++ b/python/src/sa/features.pxi
@@ -1,4 +1,4 @@
-cdef StringMap FD = StringMap()
+cdef StringMap FD = StringMap() # Feature name dictionary
INITIAL_CAPACITY = 7 # default number of features
INCREMENT = INITIAL_CAPACITY # double size
@@ -26,8 +26,8 @@ cdef class Scorer:
names = [FD.index(<char *>model.__name__) for model in models]
self.models = zip(names, models)
- cdef FeatureVector score(self, c):
+ cdef FeatureVector score(self, ctx):
cdef FeatureVector scores = FeatureVector()
for name, model in self.models:
- scores.set(name, model(c.fphrase, c.ephrase, c.paircount, c.fcount, c.fsample_count))
+ scores.set(name, model(ctx))
return scores