Skip to content

ginza-3.1.1

Choose a tag to compare

@hiroshi-matsuda-rit hiroshi-matsuda-rit released this 19 Jan 11:45
· 350 commits to develop since this release
cec61bf

ginza-3.1.1

  • 2020-01-19
  • API Changes
    • Extension fields
      • The values of Token._.sudachi field would be set after calling SudachipyTokenizer.enable_ex_sudachi(True), to avoid serializtion errors
import spacy
import pickle
nlp = spacy.load('ja_ginza')
doc1 = nlp('This example will be serialized correctly.')
doc1.to_bytes()
with open('sample1.pickle', 'wb') as f:
    pickle.dump(doc1, f)

nlp.tokenizer.set_enable_ex_sudachi(True)
doc2 = nlp('This example will cause a serialization error.')
doc2.to_bytes()
with open('sample2.pickle', 'wb') as f:
    pickle.dump(doc2, f)