diff options
author | Victor Chahuneau <vchahune@cs.cmu.edu> | 2012-09-05 14:55:11 +0100 |
---|---|---|
committer | Victor Chahuneau <vchahune@cs.cmu.edu> | 2012-09-05 14:55:11 +0100 |
commit | fb4a9cd8874976a1c013b880b342961b72a8c0d7 (patch) | |
tree | e75e21d414980b0f4d9953cea3eb43e8c8355261 /python/src/sa/features.pxi | |
parent | b34a325f1496eb4bbc33c5fe156eb7e28e5add27 (diff) |
Expose new feature extraction API
Diffstat (limited to 'python/src/sa/features.pxi')
-rw-r--r-- | python/src/sa/features.pxi | 6 |
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 |