Yaptığınız çalışmayı test etmek istedim ama aşağıdaki gibi ymly dosyasını okurken bir hata alıyorum.
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\Semiha\Anaconda2\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 699, in runfile
execfile(filename, namespace)
File "C:\Users\Semiha\Anaconda2\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 74, in execfile
exec(compile(scripttext, filename, 'exec'), glob, loc)
File "E:/Python Scripts/turkish-pos-tagger/example.py", line 8, in
from pos_tagger import tr_tag
File "pos_tagger.py", line 22, in
myTagger=yaml.load(f)
File "C:\Users\Semiha\Anaconda2\lib\site-packages\yaml__init__.py", line 71, in load
return loader.get_single_data()
File "C:\Users\Semiha\Anaconda2\lib\site-packages\yaml\constructor.py", line 39, in get_single_data
return self.construct_document(node)
File "C:\Users\Semiha\Anaconda2\lib\site-packages\yaml\constructor.py", line 43, in construct_document
data = self.construct_object(node)
File "C:\Users\Semiha\Anaconda2\lib\site-packages\yaml\constructor.py", line 88, in construct_object
data = constructor(self, node)
File "C:\Users\Semiha\Anaconda2\lib\site-packages\yaml\constructor.py", line 414, in construct_undefined
node.start_mark)
yaml.constructor.ConstructorError: could not determine a constructor for the tag '!nltk.BrillTagger'
in "", line 1, column 1:
!nltk.BrillTagger
^
load kısmını load_all yaptım bu kezde "return_list.append(myTagger.tag(token))" kısmında bir hata alıyorum;
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\Semiha\Anaconda2\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 699, in runfile
execfile(filename, namespace)
File "C:\Users\Semiha\Anaconda2\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 74, in execfile
exec(compile(scripttext, filename, 'exec'), glob, loc)
File "E:/Python Scripts/turkish-pos-tagger/example.py", line 9, in
print tr_tag('Bunu başından beri biliyordum zaten .')
File "pos_tagger.py", line 31, in tr_tag
return_list.append(myTagger.tag(token))
AttributeError: 'generator' object has no attribute 'tag'
tag diye bir alan yok diyor. bunu nasıl çözebilirim.
iyi çalışmalar.