2020-04-24 23:36:52 +00:00
|
|
|
{ buildPythonPackage
|
2021-02-05 17:12:51 +00:00
|
|
|
, lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, click
|
|
|
|
, six
|
|
|
|
, tqdm
|
|
|
|
, joblib
|
|
|
|
, pytest
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "sacremoses";
|
|
|
|
version = "0.0.35";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "alvations";
|
|
|
|
repo = pname;
|
2020-11-03 02:18:15 +00:00
|
|
|
rev = version;
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "1gzr56w8yx82mn08wax5m0xyg15ym4ri5l80gmagp8r53443j770";
|
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ click six tqdm joblib ];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ pytest ];
|
2020-04-24 23:36:52 +00:00
|
|
|
# ignore tests which call to remote host
|
|
|
|
checkPhase = ''
|
|
|
|
pytest -k 'not truecase'
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/alvations/sacremoses";
|
|
|
|
description = "Python port of Moses tokenizer, truecaser and normalizer";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "sacremoses";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.lgpl21Plus;
|
2020-08-20 17:08:02 +00:00
|
|
|
platforms = platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ pashashocky ];
|
|
|
|
};
|
|
|
|
}
|