2019-12-06 18:37:50 +00:00
|
|
|
{ buildPythonPackage
|
2021-01-25 08:26:54 +00:00
|
|
|
, lib
|
2019-12-06 18:37:50 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, click
|
|
|
|
, six
|
|
|
|
, tqdm
|
|
|
|
, joblib
|
|
|
|
, pytest
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "sacremoses";
|
|
|
|
version = "0.0.35";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "alvations";
|
|
|
|
repo = pname;
|
2020-11-01 22:39:49 +00:00
|
|
|
rev = version;
|
2019-12-06 18:37:50 +00:00
|
|
|
sha256 = "1gzr56w8yx82mn08wax5m0xyg15ym4ri5l80gmagp8r53443j770";
|
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ click six tqdm joblib ];
|
|
|
|
|
|
|
|
checkInputs = [ pytest ];
|
|
|
|
# ignore tests which call to remote host
|
|
|
|
checkPhase = ''
|
|
|
|
pytest -k 'not truecase'
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-12-06 18:37:50 +00:00
|
|
|
homepage = "https://github.com/alvations/sacremoses";
|
|
|
|
description = "Python port of Moses tokenizer, truecaser and normalizer";
|
|
|
|
license = licenses.lgpl21Plus;
|
2020-08-05 08:03:26 +01:00
|
|
|
platforms = platforms.unix;
|
2019-12-06 18:37:50 +00:00
|
|
|
maintainers = with maintainers; [ pashashocky ];
|
|
|
|
};
|
|
|
|
}
|