Closed aweakley closed 4 months ago
packrat
is enough for this?) and closes PR #36>>> from edtf import parse_edtf
>>> parse_edtf("Vodka")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/colecrawford/GitHub/python-edtf/edtf/parser/grammar.py", line 360, in parse_edtf
raise EDTFParseException(input_string, err) from None
edtf.parser.edtf_exceptions.EDTFParseException: Error at position 0: Invalid input or format near 'Vodka'. Please provide a valid EDTF string.
>>> parse_edtf("576")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/colecrawford/GitHub/python-edtf/edtf/parser/grammar.py", line 360, in parse_edtf
raise EDTFParseException(input_string, err) from None
edtf.parser.edtf_exceptions.EDTFParseException: Error at position 3: Invalid input or format near '576'. Please provide a valid EDTF string.
>>> parsed_natural = text_to_edtf('circa 17th century')
>>> parsed_natural
'16XX~'
>>> parse_edtf(parsed_natural)
Unspecified: '16XX~'
Issues to tackle still:
Related issues: