Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion LexTo.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-

import jpype
import os
Expand All @@ -22,7 +23,7 @@ def tokenize(self, line):

self.lexto.wordInstance(line)
typeList = self.lexto.getTypeList()
typeList = [self.typeString[n] for n in typeList]
typeList = [self.typeString[n.value] for n in typeList]

wordList = []
begin = self.lexto.first()
Expand Down
4 changes: 2 additions & 2 deletions example.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
text = u"อยากรู้เรื่องยาคูลท์ ถามสาวยาคูลท์สิคะ"
words, types = lexto.tokenize(text)

print '|'.join(words)
print '|'.join(types)
print('|'.join(words))
print('|'.join(types))