mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-11 04:08:09 +03:00
Add Spanish and move example sentences to meta
This commit is contained in:
parent
1bebc6392c
commit
c6dc2fafc0
|
@ -77,7 +77,8 @@
|
||||||
{ "id": "model", "title": "Models", "multiple": true, "options": [
|
{ "id": "model", "title": "Models", "multiple": true, "options": [
|
||||||
{ "id": "en", "title": "English", "meta": "50MB" },
|
{ "id": "en", "title": "English", "meta": "50MB" },
|
||||||
{ "id": "de", "title": "German", "meta": "645MB" },
|
{ "id": "de", "title": "German", "meta": "645MB" },
|
||||||
{ "id": "fr", "title": "French", "meta": "1.33GB" }]
|
{ "id": "fr", "title": "French", "meta": "1.33GB" },
|
||||||
|
{ "id": "es", "title": "Spanish", "meta": "377MB"}]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
|
@ -85,7 +86,8 @@
|
||||||
{ "id": "lang", "title": "Language", "options": [
|
{ "id": "lang", "title": "Language", "options": [
|
||||||
{ "id": "en", "title": "English", "checked": true },
|
{ "id": "en", "title": "English", "checked": true },
|
||||||
{ "id": "de", "title": "German" },
|
{ "id": "de", "title": "German" },
|
||||||
{ "id": "fr", "title": "French" }]
|
{ "id": "fr", "title": "French" },
|
||||||
|
{ "id": "es", "title": "Spanish" }]
|
||||||
},
|
},
|
||||||
{ "id": "load", "title": "Loading style", "options": [
|
{ "id": "load", "title": "Loading style", "options": [
|
||||||
{ "id": "spacy", "title": "Use spacy.load()", "checked": true, "help": "Use spaCy's built-in loader to load the model by name." },
|
{ "id": "spacy", "title": "Use spacy.load()", "checked": true, "help": "Use spaCy's built-in loader to load the model by name." },
|
||||||
|
@ -108,9 +110,19 @@
|
||||||
],
|
],
|
||||||
"fr": [
|
"fr": [
|
||||||
{ "id": "fr_depvec_web_lg", "lang": "French", "feats": [1, 1, 0, 1], "size": "1.33 GB", "license": "CC BY-NC" }
|
{ "id": "fr_depvec_web_lg", "lang": "French", "feats": [1, 1, 0, 1], "size": "1.33 GB", "license": "CC BY-NC" }
|
||||||
|
],
|
||||||
|
"es": [
|
||||||
|
{ "id": "es_core_web_md", "lang": "Spanish", "feats": [1, 1, 1, 1], "size": "377 MB", "license": "CC BY-SA"}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"EXAMPLE_SENTENCES": {
|
||||||
|
"en": "This is a sentence.",
|
||||||
|
"de": "Dies ist ein Satz.",
|
||||||
|
"fr": "C'est une phrase.",
|
||||||
|
"es": "Esto es una frase."
|
||||||
|
},
|
||||||
|
|
||||||
"ALPHA": true,
|
"ALPHA": true,
|
||||||
"V_CSS": "1.6",
|
"V_CSS": "1.6",
|
||||||
"V_JS": "1.2",
|
"V_JS": "1.2",
|
||||||
|
|
|
@ -40,6 +40,7 @@ p
|
||||||
+qs({model: 'en'}) python -m spacy download en
|
+qs({model: 'en'}) python -m spacy download en
|
||||||
+qs({model: 'de'}) python -m spacy download de
|
+qs({model: 'de'}) python -m spacy download de
|
||||||
+qs({model: 'fr'}) python -m spacy download fr
|
+qs({model: 'fr'}) python -m spacy download fr
|
||||||
|
+qs({model: 'es'}) python -m spacy download es
|
||||||
|
|
||||||
+h(2, "installation") Installation instructions
|
+h(2, "installation") Installation instructions
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,6 @@ p
|
||||||
| skew, which might decrease your accuracy.
|
| skew, which might decrease your accuracy.
|
||||||
|
|
||||||
+quickstart(QUICKSTART_MODELS, "Quickstart", "Install a default model, get the code to load it from within spaCy and an example to test it. For more options, see the section on available models below.")
|
+quickstart(QUICKSTART_MODELS, "Quickstart", "Install a default model, get the code to load it from within spaCy and an example to test it. For more options, see the section on available models below.")
|
||||||
- var examples = {en: "This is a sentence.", de: "Dies ist ein Satz.", fr: "C'est une phrase."}
|
|
||||||
for models, lang in MODELS
|
for models, lang in MODELS
|
||||||
- var package = (models.length == 1) ? models[0] : models.find(function(m) { return m.def })
|
- var package = (models.length == 1) ? models[0] : models.find(function(m) { return m.def })
|
||||||
+qs({lang: lang}) python -m spacy download #{lang}
|
+qs({lang: lang}) python -m spacy download #{lang}
|
||||||
|
@ -26,7 +25,7 @@ p
|
||||||
+qs({lang: lang, load: "module"}, "python") import #{package.id}
|
+qs({lang: lang, load: "module"}, "python") import #{package.id}
|
||||||
+qs({lang: lang, load: "module"}, "python") nlp = #{package.id}.load()
|
+qs({lang: lang, load: "module"}, "python") nlp = #{package.id}.load()
|
||||||
+qs({lang: lang, load: "spacy"}, "python") nlp = spacy.load('#{lang}')
|
+qs({lang: lang, load: "spacy"}, "python") nlp = spacy.load('#{lang}')
|
||||||
+qs({lang: lang, config: "example"}, "python") doc = nlp(u"#{examples[lang]}")
|
+qs({lang: lang, config: "example"}, "python") doc = nlp(u"#{EXAMPLE_SENTENCES[lang]}")
|
||||||
+qs({lang: lang, config: "example"}, "python") print([(w.text, w.pos_) for w in doc])
|
+qs({lang: lang, config: "example"}, "python") print([(w.text, w.pos_) for w in doc])
|
||||||
|
|
||||||
+h(2, "available") Available models
|
+h(2, "available") Available models
|
||||||
|
|
Loading…
Reference in New Issue
Block a user