mirror of
https://github.com/explosion/spaCy.git
synced 2025-08-03 11:50:19 +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()
|
||||
.render_table(fully_featured_doc_one_sentence, formats, spacing=1)
|
||||
.strip()
|
||||
.replace("\r", "")
|
||||
== """
|
||||
╔>╔═ poss Sarah sarah PROPN NNP NounType=prop|Number=sing PERSON
|
||||
║ ╚> case 's 's PART POS Poss=yes
|
||||
|
@ -658,9 +657,7 @@ def test_visualization_spacing(
|
|||
╠══>╔═ prep via via ADP IN
|
||||
║ ╚> pobj London london PROPN NNP NounType=prop|Number=sing GPE
|
||||
╚════> punct . . PUNCT . PunctType=peri
|
||||
""".strip().replace(
|
||||
"\r", ""
|
||||
)
|
||||
""".strip()
|
||||
)
|
||||
|
||||
|
||||
|
@ -682,7 +679,6 @@ def test_visualization_minimal_render_table_two_sentences(
|
|||
Visualizer()
|
||||
.render_table(fully_featured_doc_two_sentences, formats, spacing=3)
|
||||
.strip()
|
||||
.replace("\r", "")
|
||||
== """
|
||||
╔>╔═ poss Sarah sarah PROPN NNP NounType=prop|Number=sing PERSON
|
||||
║ ╚> 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
|
||||
╠> dobj it it PRON PRP Case=Acc|Gender=Neut|Number=Sing|Person=3|PronType=Prs
|
||||
╚> punct . . PUNCT . PunctType=peri
|
||||
""".strip().replace(
|
||||
"\r", ""
|
||||
)
|
||||
""".strip()
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
from typing import Dict, List, Optional, Union, cast
|
||||
from os import linesep
|
||||
import wasabi
|
||||
from wasabi.util import supports_ansi
|
||||
from spacy.tokens import Span, Token, Doc
|
||||
|
@ -431,7 +430,7 @@ class Visualizer:
|
|||
bg_colors=bg_colors,
|
||||
spacing=spacing,
|
||||
)
|
||||
+ linesep
|
||||
+ "\n"
|
||||
)
|
||||
return return_string
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user