You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
turian
changed the title
[Feature]: Sentence to and from JSON serialization
[Feature]: Sentence to and from JSON serialization (or from_dict)
Jul 13, 2023
Problem statement
For serving flair Sentences over an inference API, it would be very useful to be able to serialize the Sentence to and from JSON.
Solution
Ideally,
json.dumps(Sentence)
should work. Or, at least,Sentence
should have ato_json
method and staticfrom_json
method.Or, some simply, all relevant classes could have a
from_dict
static method, so thatSentence.from_dict(s.to_dict()) == s
Additional Context
No response
The text was updated successfully, but these errors were encountered: