Closed TScheffler closed 5 years ago
Unfortunately I wasn't able to replicate the DeprecationWarning. Nevertheless, I changed np.fromstring() to np.frombuffer(). Could you update to v1.6.2 and check if everything works as expected?
Thank you it works now! I managed to tag the test sentence. Many thanks for the quick fix.
I'm trying to use SoMeWeTa in a notebook and get this error over and over:
self.weights = {f: np.fromstring(base64.b85decode(w), np.float64) for f, w in zip(features, weights)} /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/someweta/tagger.py:225: DeprecationWarning: The binary mode of fromstring is deprecated, as it behaves surprisingly on unicode inputs. Use frombuffer instead
The model (German social media) does not even load, I can't run this minimal example:
asptagger = ASPTagger(beam_size=5, iterations=10) asptagger.load(pos_model) print("got model!")
much less actually tag something:
asptagger.tag_sentence(["Ein", "Satz", "ist", "eine", "Liste", "von", "Tokens", "."])
This used to work before (i.e. last year) so I'm not sure what changed.