mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-15 22:27:12 +03:00
32 lines
788 B
Python
32 lines
788 B
Python
|
from spacy.cli.converters.conllu2json import conllu2json
|
||
|
|
||
|
input_data = """
|
||
|
1 [ _ PUNCT -LRB- _ _ punct _ _
|
||
|
2 This _ DET DT _ _ det _ _
|
||
|
3 killing _ NOUN NN _ _ nsubj _ _
|
||
|
4 of _ ADP IN _ _ case _ _
|
||
|
5 a _ DET DT _ _ det _ _
|
||
|
6 respected _ ADJ JJ _ _ amod _ _
|
||
|
7 cleric _ NOUN NN _ _ nmod _ _
|
||
|
8 will _ AUX MD _ _ aux _ _
|
||
|
9 be _ AUX VB _ _ aux _ _
|
||
|
10 causing _ VERB VBG _ _ root _ _
|
||
|
11 us _ PRON PRP _ _ iobj _ _
|
||
|
12 trouble _ NOUN NN _ _ dobj _ _
|
||
|
13 for _ ADP IN _ _ case _ _
|
||
|
14 years _ NOUN NNS _ _ nmod _ _
|
||
|
15 to _ PART TO _ _ mark _ _
|
||
|
16 come _ VERB VB _ _ acl _ _
|
||
|
17 . _ PUNCT . _ _ punct _ _
|
||
|
18 ] _ PUNCT -RRB- _ _ punct _ _
|
||
|
"""
|
||
|
|
||
|
|
||
|
def test_issue4665():
|
||
|
"""
|
||
|
conllu2json should not raise an exception if the HEAD column contains an
|
||
|
underscore
|
||
|
"""
|
||
|
|
||
|
conllu2json(input_data)
|