mirror of
https://github.com/explosion/spaCy.git
synced 2025-08-06 05:10:21 +03:00
Use \n rather than linesep for consistency with wasabi
This commit is contained in:
parent
85da92f041
commit
cc21eac88a
|
@ -646,7 +646,6 @@ def test_visualization_spacing(
|
||||||
Visualizer()
|
Visualizer()
|
||||||
.render_table(fully_featured_doc_one_sentence, formats, spacing=1)
|
.render_table(fully_featured_doc_one_sentence, formats, spacing=1)
|
||||||
.strip()
|
.strip()
|
||||||
.replace("\r", "")
|
|
||||||
== """
|
== """
|
||||||
╔>╔═ poss Sarah sarah PROPN NNP NounType=prop|Number=sing PERSON
|
╔>╔═ poss Sarah sarah PROPN NNP NounType=prop|Number=sing PERSON
|
||||||
║ ╚> case 's 's PART POS Poss=yes
|
║ ╚> case 's 's PART POS Poss=yes
|
||||||
|
@ -658,9 +657,7 @@ def test_visualization_spacing(
|
||||||
╠══>╔═ prep via via ADP IN
|
╠══>╔═ prep via via ADP IN
|
||||||
║ ╚> pobj London london PROPN NNP NounType=prop|Number=sing GPE
|
║ ╚> pobj London london PROPN NNP NounType=prop|Number=sing GPE
|
||||||
╚════> punct . . PUNCT . PunctType=peri
|
╚════> punct . . PUNCT . PunctType=peri
|
||||||
""".strip().replace(
|
""".strip()
|
||||||
"\r", ""
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -682,7 +679,6 @@ def test_visualization_minimal_render_table_two_sentences(
|
||||||
Visualizer()
|
Visualizer()
|
||||||
.render_table(fully_featured_doc_two_sentences, formats, spacing=3)
|
.render_table(fully_featured_doc_two_sentences, formats, spacing=3)
|
||||||
.strip()
|
.strip()
|
||||||
.replace("\r", "")
|
|
||||||
== """
|
== """
|
||||||
╔>╔═ poss Sarah sarah PROPN NNP NounType=prop|Number=sing PERSON
|
╔>╔═ poss Sarah sarah PROPN NNP NounType=prop|Number=sing PERSON
|
||||||
║ ╚> case 's 's PART POS Poss=yes
|
║ ╚> case 's 's PART POS Poss=yes
|
||||||
|
@ -700,9 +696,7 @@ def test_visualization_minimal_render_table_two_sentences(
|
||||||
╠═ ROOT loved love VERB VBD Tense=Past|VerbForm=Fin
|
╠═ ROOT loved love VERB VBD Tense=Past|VerbForm=Fin
|
||||||
╠> dobj it it PRON PRP Case=Acc|Gender=Neut|Number=Sing|Person=3|PronType=Prs
|
╠> dobj it it PRON PRP Case=Acc|Gender=Neut|Number=Sing|Person=3|PronType=Prs
|
||||||
╚> punct . . PUNCT . PunctType=peri
|
╚> punct . . PUNCT . PunctType=peri
|
||||||
""".strip().replace(
|
""".strip()
|
||||||
"\r", ""
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
from typing import Dict, List, Optional, Union, cast
|
from typing import Dict, List, Optional, Union, cast
|
||||||
from os import linesep
|
|
||||||
import wasabi
|
import wasabi
|
||||||
from wasabi.util import supports_ansi
|
from wasabi.util import supports_ansi
|
||||||
from spacy.tokens import Span, Token, Doc
|
from spacy.tokens import Span, Token, Doc
|
||||||
|
@ -431,7 +430,7 @@ class Visualizer:
|
||||||
bg_colors=bg_colors,
|
bg_colors=bg_colors,
|
||||||
spacing=spacing,
|
spacing=spacing,
|
||||||
)
|
)
|
||||||
+ linesep
|
+ "\n"
|
||||||
)
|
)
|
||||||
return return_string
|
return return_string
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user