mirror of
https://github.com/explosion/spaCy.git
synced 2025-06-05 21:53:05 +03:00
Fix formatting and consistency
This commit is contained in:
parent
36514b5762
commit
f0e7da6478
|
@ -581,7 +581,7 @@ p
|
||||||
| web applications.
|
| web applications.
|
||||||
|
|
||||||
+aside-code("Example").
|
+aside-code("Example").
|
||||||
doc = nlp('Alice ate the pizza.')
|
doc = nlp(u'Alice ate the pizza.')
|
||||||
trees = doc.print_tree()
|
trees = doc.print_tree()
|
||||||
# {'modifiers': [
|
# {'modifiers': [
|
||||||
# {'modifiers': [], 'NE': 'PERSON', 'word': 'Alice', 'arc': 'nsubj', 'POS_coarse': 'PROPN', 'POS_fine': 'NNP', 'lemma': 'Alice'},
|
# {'modifiers': [], 'NE': 'PERSON', 'word': 'Alice', 'arc': 'nsubj', 'POS_coarse': 'PROPN', 'POS_fine': 'NNP', 'lemma': 'Alice'},
|
||||||
|
@ -615,8 +615,8 @@ p
|
||||||
| document.
|
| document.
|
||||||
|
|
||||||
+aside-code("Example").
|
+aside-code("Example").
|
||||||
tokens = nlp(u'Mr. Best flew to New York on Saturday morning.')
|
doc = nlp(u'Mr. Best flew to New York on Saturday morning.')
|
||||||
ents = list(tokens.ents)
|
ents = list(doc.ents)
|
||||||
assert ents[0].label == 346
|
assert ents[0].label == 346
|
||||||
assert ents[0].label_ == 'PERSON'
|
assert ents[0].label_ == 'PERSON'
|
||||||
assert ents[0].text == 'Mr. Best'
|
assert ents[0].text == 'Mr. Best'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user