mirror of
https://github.com/explosion/spaCy.git
synced 2025-08-02 11:20:19 +03:00
Add comment
This commit is contained in:
parent
acc8018302
commit
cf7f51b37e
|
@ -119,8 +119,8 @@ def render_dep_tree(sent, root_right: bool) -> List[str]:
|
||||||
dependency tree output for a given token has the same index within the output list of
|
dependency tree output for a given token has the same index within the output list of
|
||||||
strings as that token within the input document.
|
strings as that token within the input document.
|
||||||
|
|
||||||
root_right: True if the tree should be rendered with the root on the right-hand side,
|
root_right: *True* if the tree should be rendered with the root on the right-hand side,
|
||||||
False if the tree should be rendered with the root on the left-hand side.
|
*False* if the tree should be rendered with the root on the left-hand side.
|
||||||
|
|
||||||
Algorithm adapted from https://github.com/KoichiYasuoka/deplacy. It was confirmed that
|
Algorithm adapted from https://github.com/KoichiYasuoka/deplacy. It was confirmed that
|
||||||
this code outputted equivalent trees to deplacy for a large number of sentences; there
|
this code outputted equivalent trees to deplacy for a large number of sentences; there
|
||||||
|
@ -403,7 +403,7 @@ def render_table(
|
||||||
bg_colors=bg_colors,
|
bg_colors=bg_colors,
|
||||||
spacing=spacing,
|
spacing=spacing,
|
||||||
)
|
)
|
||||||
+ "\n"
|
+ "\n" # use \n instead of os.linesep to match wasabi
|
||||||
)
|
)
|
||||||
return return_str
|
return return_str
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user