Fugashi

Latest version: v1.3.2

Safety actively analyzes 630254 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 3

0.1.8

import fugashi
tagger = fugashi.GenericTagger('-d/usr/local/lib/mecab/dic/ipadic')

It's also possible to specify dictionary fields so you can get convenient access to features no matter what dictionary you use.


import fugashi
the wrapper is just a namedtuple with a default value of None for all fields
MyDictFeatures = fugashi.create_dict_wrapper('MyDictFeatures', 'lemma alpha beta'.split())
tagger = fugashi.GenericTagger('-d/usr/local/lib/mecab/dic/customdic', MyDictFeatures)
nodes = tagger.parseToNodes('blah blah')
node = nodes[0]
print(node.lemma, node.alpha, node.beta)


Some other changes:

- the raw feature string is now available as `.feature_raw` on nodes
- packaging-related fixes
- initial [mecab-ko-dic](https://bitbucket.org/eunjeon/mecab-ko-dic) (Korean) support; needs more testing

0.1.5

This update fixes two issues.

- When `Tagger()` gets invalid arguments, throw an error
- Specify Cython depency correctly (1)

Thanks to zdyh for the dependency fix!

Page 3 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.