%define upstream_name guess-language Name: python-%{upstream_name} Version: 0.2 Release: 3 Summary: Guess the natural language of a text Group: Development/Python License: LGPL URL: https://pypi.python.org/pypi/guess-language Source0: https://pypi.python.org/packages/source/g/guess-language/guess-language-%{version}.tar.gz BuildArch: noarch BuildRequires: python-devel BuildRequires: python-setuptools %description Attempts to determine the natural language of a selection of Unicode (utf-8) text. Based on guesslanguage.cpp by Jacob R Rideout for KDE which itself is based on Language::Guess by Maciej Ceglowski. Detects over 60 languages - all languages listed in the trigrams directory plus Japanese, Chinese, Korean and Greek. guess_language uses heuristics based on the character set and trigrams in a sample text to detect the language. It works better with longer samples and will be confused if the sample text includes markup such as HTML tags. %prep %setup -q -n %{upstream_name}-%{version} %build CFLAGS="%{optflags}" %{__python} setup.py build %install rm -rf %{buildroot} %{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT %files %doc README %{python_sitelib}/guess_language %{python_sitelib}/guess_language-%{version}-*.egg-info %changelog * Tue Oct 22 2013 umeabot 0.2-3.mga4 + Revision: 543533 - Mageia 4 Mass Rebuild * Tue Oct 15 2013 pterjan 0.2-2.mga4 + Revision: 498707 - Rebuild to add different pythonegg provides for python 2 and 3 * Wed Aug 21 2013 guillomovitch 0.2-1.mga4 + Revision: 468901 - imported package python-guess-language