mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-27 02:16:32 +03:00
b7916fffcf
* few typos / small grammatical errors corrected in documentation * one more typo * one last typo
49 lines
2.2 KiB
Plaintext
49 lines
2.2 KiB
Plaintext
//- 💫 DOCS > USAGE > VISUALIZERS
|
||
|
||
include ../_includes/_mixins
|
||
|
||
+section
|
||
p
|
||
| As of v2.0, our popular visualizers, #[+a(DEMOS_URL + "/displacy") displaCy]
|
||
| and #[+a(DEMOS_URL + "/displacy-ent") displaCy #[sup ENT]] are finally an
|
||
| official part of the library. Visualizing a dependency parse or named
|
||
| entities in a text is not only a fun NLP demo – it can also be incredibly
|
||
| helpful in speeding up development and debugging your code and training
|
||
| process. If you're running a #[+a("https://jupyter.org") Jupyter] notebook,
|
||
| displaCy will detect this and return the markup in a format
|
||
| #[+a("#jupyter") ready to be rendered and exported].
|
||
|
||
+aside("What about the old visualizers?")
|
||
| Our JavaScript-based visualizers #[+src(gh("displacy")) #[code displacy.js]] and
|
||
| #[+src(gh("displacy-ent")) #[code displacy-ent.js]] will still be available on
|
||
| GitHub. If you're looking to implement web-based visualizations, we
|
||
| generally recommend using those instead of spaCy's built-in
|
||
| #[code displacy] module. It'll allow your application to perform all
|
||
| rendering on the client and only rely on the server for the text
|
||
| processing. The generated markup is also more compatible with modern web
|
||
| standards.
|
||
|
||
p
|
||
| The quickest way to visualize #[code Doc] is to use
|
||
| #[+api("displacy#serve") #[code displacy.serve]]. This will spin up a
|
||
| simple web server and let you view the result straight from your browser.
|
||
| displaCy can either take a single #[code Doc] or a list of #[code Doc]
|
||
| objects as its first argument. This lets you construct them however you
|
||
| like – using any model or modifications you like.
|
||
|
||
+section("dep")
|
||
+h(2, "dep") Visualizing the dependency parse
|
||
include _visualizers/_dep
|
||
|
||
+section("ent")
|
||
+h(2, "ent") Visualizing the entity recognizer
|
||
include _visualizers/_ent
|
||
|
||
+section("jupyter")
|
||
+h(2, "jupyter") Using displaCy in Jupyter notebooks
|
||
include _visualizers/_jupyter
|
||
|
||
+section("html")
|
||
+h(2, "html") Rendering HTML
|
||
include _visualizers/_html
|