Skip to content

Commit

Permalink
[python] Minor interface change
Browse files Browse the repository at this point in the history
  • Loading branch information
vchahun committed Oct 25, 2012
1 parent f2f7ced commit 9683dad
Show file tree
Hide file tree
Showing 2 changed files with 139 additions and 28 deletions.
163 changes: 137 additions & 26 deletions python/kenlm.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions python/kenlm.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ cdef bytes as_str(data):

cdef class LanguageModel:
cdef Model* model
cdef bytes path
cdef public bytes path
cdef const_Vocabulary* vocab

def __cinit__(self, path):
def __init__(self, path):
self.path = os.path.abspath(as_str(path))
try:
self.model = new Model(self.path)
Expand Down

0 comments on commit 9683dad

Please sign in to comment.