mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 18:06:29 +03:00
Merge branch 'develop'
This commit is contained in:
commit
01067e99d4
|
@ -4,6 +4,7 @@ from __future__ import unicode_literals
|
||||||
import platform
|
import platform
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
|
from ..compat import unicode_
|
||||||
from .. import about
|
from .. import about
|
||||||
from .. import util
|
from .. import util
|
||||||
|
|
||||||
|
@ -13,10 +14,10 @@ def info(model=None, markdown=False):
|
||||||
data = util.parse_package_meta(util.get_data_path(), model, require=True)
|
data = util.parse_package_meta(util.get_data_path(), model, require=True)
|
||||||
model_path = Path(__file__).parent / util.get_data_path() / model
|
model_path = Path(__file__).parent / util.get_data_path() / model
|
||||||
if model_path.resolve() != model_path:
|
if model_path.resolve() != model_path:
|
||||||
data['link'] = str(model_path)
|
data['link'] = unicode_(model_path)
|
||||||
data['source'] = str(model_path.resolve())
|
data['source'] = unicode_(model_path.resolve())
|
||||||
else:
|
else:
|
||||||
data['source'] = str(model_path)
|
data['source'] = unicode_(model_path)
|
||||||
print_info(data, "model " + model, markdown)
|
print_info(data, "model " + model, markdown)
|
||||||
else:
|
else:
|
||||||
data = get_spacy_data()
|
data = get_spacy_data()
|
||||||
|
@ -34,7 +35,7 @@ def print_info(data, title, markdown):
|
||||||
def get_spacy_data():
|
def get_spacy_data():
|
||||||
return {
|
return {
|
||||||
'spaCy version': about.__version__,
|
'spaCy version': about.__version__,
|
||||||
'Location': str(Path(__file__).parent.parent),
|
'Location': unicode_(Path(__file__).parent.parent),
|
||||||
'Platform': platform.platform(),
|
'Platform': platform.platform(),
|
||||||
'Python version': platform.python_version(),
|
'Python version': platform.python_version(),
|
||||||
'Installed models': ', '.join(list_models())
|
'Installed models': ', '.join(list_models())
|
||||||
|
|
Loading…
Reference in New Issue
Block a user