diff options
author | Thierry Thomas <thierry@FreeBSD.org> | 2020-12-01 21:21:06 +0800 |
---|---|---|
committer | Thierry Thomas <thierry@FreeBSD.org> | 2020-12-01 21:21:06 +0800 |
commit | 181dac2f088dae5538a92eefc7455f913f487ae6 (patch) | |
tree | 177c6ffd8d8b3eab432b476634ea2911e1ddb5c4 /textproc | |
parent | c1a2fdd340bb4cea791a104e34f8e21a91ad80e0 (diff) | |
download | freebsd-ports-gnome-181dac2f088dae5538a92eefc7455f913f487ae6.tar.gz freebsd-ports-gnome-181dac2f088dae5538a92eefc7455f913f487ae6.tar.zst freebsd-ports-gnome-181dac2f088dae5538a92eefc7455f913f487ae6.zip |
Adding py-langid, a standalone Language Identification (LangID) tool.
Diffstat (limited to 'textproc')
-rw-r--r-- | textproc/Makefile | 1 | ||||
-rw-r--r-- | textproc/py-langid/Makefile | 33 | ||||
-rw-r--r-- | textproc/py-langid/distinfo | 3 | ||||
-rw-r--r-- | textproc/py-langid/pkg-descr | 17 | ||||
-rw-r--r-- | textproc/py-langid/pkg-plist | 23 |
5 files changed, 77 insertions, 0 deletions
diff --git a/textproc/Makefile b/textproc/Makefile index ec58fc5d5084..bdde123b855d 100644 --- a/textproc/Makefile +++ b/textproc/Makefile @@ -1297,6 +1297,7 @@ SUBDIR += py-jtextfsm SUBDIR += py-junit-xml SUBDIR += py-langdetect + SUBDIR += py-langid SUBDIR += py-laserhammer SUBDIR += py-libxml2 SUBDIR += py-license-expression diff --git a/textproc/py-langid/Makefile b/textproc/py-langid/Makefile new file mode 100644 index 000000000000..9bce3b136baf --- /dev/null +++ b/textproc/py-langid/Makefile @@ -0,0 +1,33 @@ +# Created by: Thierry Thomas <thierry@pompo.net> +# $FreeBSD$ + +PORTNAME= langid +DISTVERSION= 1.1.6-20170715 +CATEGORIES= textproc devel python +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= thierry@FreeBSD.org +COMMENT= Standalone Language Identification (LangID) tool + +LICENSE= BSD2CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= ${PYNUMPY} +RUN_DEPENDS= ${PYNUMPY} + +USE_GITHUB= yes +GH_ACCOUNT= saffsd +GH_PROJECT= ${PORTNAME}.py +GH_TAGNAME= 4153583 + +USES= python:3.6+ shebangfix +USE_PYTHON= distutils +SHEBANG_GLOB= *.py + +NO_ARCH= yes + +post-extract: + ${MKDIR} ${WRKDIR}/unsupported-Python-2.7 + ${MV} ${WRKSRC}/langid/train ${WRKDIR}/unsupported-Python-2.7 + +.include <bsd.port.mk> diff --git a/textproc/py-langid/distinfo b/textproc/py-langid/distinfo new file mode 100644 index 000000000000..7bf7e79e3177 --- /dev/null +++ b/textproc/py-langid/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1606746121 +SHA256 (saffsd-langid.py-1.1.6-20170715-4153583_GH0.tar.gz) = 04b005bd607fcf54f9b06b41a20f968fcb5bdd7d96ec5471177c88ef858ffc9d +SIZE (saffsd-langid.py-1.1.6-20170715-4153583_GH0.tar.gz) = 1959856 diff --git a/textproc/py-langid/pkg-descr b/textproc/py-langid/pkg-descr new file mode 100644 index 000000000000..5f3d76514028 --- /dev/null +++ b/textproc/py-langid/pkg-descr @@ -0,0 +1,17 @@ +langid.py is a standalone Language Identification (LangID) tool. + +The design principles are as follows: + + Fast + Pre-trained over a large number of languages (currently 97) + Not sensitive to domain-specific features (e.g. HTML/XML markup) + Single .py file with minimal dependencies + Deployable as a web service + +Remark: the main script langid/langid.py is cross-compatible with both Python2 +and Python3, but the accompanying training tools are still Python2-only, hence +not installed by this port. + +See also the port textproc/py-langdetect for a similar program. + +WWW: https://github.com/saffsd/langid.py diff --git a/textproc/py-langid/pkg-plist b/textproc/py-langid/pkg-plist new file mode 100644 index 000000000000..4773b9c32de8 --- /dev/null +++ b/textproc/py-langid/pkg-plist @@ -0,0 +1,23 @@ +bin/langid +%%PYTHON_SITELIBDIR%%/langid-1.1.6-py%%PYTHON_VER%%.egg-info/PKG-INFO +%%PYTHON_SITELIBDIR%%/langid-1.1.6-py%%PYTHON_VER%%.egg-info/SOURCES.txt +%%PYTHON_SITELIBDIR%%/langid-1.1.6-py%%PYTHON_VER%%.egg-info/dependency_links.txt +%%PYTHON_SITELIBDIR%%/langid-1.1.6-py%%PYTHON_VER%%.egg-info/entry_points.txt +%%PYTHON_SITELIBDIR%%/langid-1.1.6-py%%PYTHON_VER%%.egg-info/not-zip-safe +%%PYTHON_SITELIBDIR%%/langid-1.1.6-py%%PYTHON_VER%%.egg-info/requires.txt +%%PYTHON_SITELIBDIR%%/langid-1.1.6-py%%PYTHON_VER%%.egg-info/top_level.txt +%%PYTHON_SITELIBDIR%%/langid/__init__.py +%%PYTHON_SITELIBDIR%%/langid/__pycache__/__init__.cpython-%%PYTHON_SUFFIX%%.opt-1.pyc +%%PYTHON_SITELIBDIR%%/langid/__pycache__/__init__.cpython-%%PYTHON_SUFFIX%%.pyc +%%PYTHON_SITELIBDIR%%/langid/__pycache__/langid.cpython-%%PYTHON_SUFFIX%%.opt-1.pyc +%%PYTHON_SITELIBDIR%%/langid/__pycache__/langid.cpython-%%PYTHON_SUFFIX%%.pyc +%%PYTHON_SITELIBDIR%%/langid/langid.py +%%PYTHON_SITELIBDIR%%/langid/tools/__init__.py +%%PYTHON_SITELIBDIR%%/langid/tools/__pycache__/__init__.cpython-%%PYTHON_SUFFIX%%.opt-1.pyc +%%PYTHON_SITELIBDIR%%/langid/tools/__pycache__/__init__.cpython-%%PYTHON_SUFFIX%%.pyc +%%PYTHON_SITELIBDIR%%/langid/tools/__pycache__/featWeights.cpython-%%PYTHON_SUFFIX%%.opt-1.pyc +%%PYTHON_SITELIBDIR%%/langid/tools/__pycache__/featWeights.cpython-%%PYTHON_SUFFIX%%.pyc +%%PYTHON_SITELIBDIR%%/langid/tools/__pycache__/printfeats.cpython-%%PYTHON_SUFFIX%%.opt-1.pyc +%%PYTHON_SITELIBDIR%%/langid/tools/__pycache__/printfeats.cpython-%%PYTHON_SUFFIX%%.pyc +%%PYTHON_SITELIBDIR%%/langid/tools/featWeights.py +%%PYTHON_SITELIBDIR%%/langid/tools/printfeats.py |