summaryrefslogtreecommitdiffstats
path: root/third_party/python/text_unidecode
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/python/text_unidecode')
-rw-r--r--third_party/python/text_unidecode/text_unidecode-1.3.dist-info/DESCRIPTION.rst46
-rw-r--r--third_party/python/text_unidecode/text_unidecode-1.3.dist-info/LICENSE.txt134
-rw-r--r--third_party/python/text_unidecode/text_unidecode-1.3.dist-info/METADATA73
-rw-r--r--third_party/python/text_unidecode/text_unidecode-1.3.dist-info/RECORD9
-rw-r--r--third_party/python/text_unidecode/text_unidecode-1.3.dist-info/WHEEL6
-rw-r--r--third_party/python/text_unidecode/text_unidecode-1.3.dist-info/metadata.json1
-rw-r--r--third_party/python/text_unidecode/text_unidecode-1.3.dist-info/top_level.txt1
-rw-r--r--third_party/python/text_unidecode/text_unidecode/__init__.py21
-rw-r--r--third_party/python/text_unidecode/text_unidecode/data.binbin0 -> 311077 bytes
9 files changed, 291 insertions, 0 deletions
diff --git a/third_party/python/text_unidecode/text_unidecode-1.3.dist-info/DESCRIPTION.rst b/third_party/python/text_unidecode/text_unidecode-1.3.dist-info/DESCRIPTION.rst
new file mode 100644
index 0000000000..a17ced9af0
--- /dev/null
+++ b/third_party/python/text_unidecode/text_unidecode-1.3.dist-info/DESCRIPTION.rst
@@ -0,0 +1,46 @@
+Text-Unidecode
+==============
+
+.. image:: https://travis-ci.org/kmike/text-unidecode.svg?branch=master
+ :target: https://travis-ci.org/kmike/text-unidecode
+ :alt: Build Status
+
+text-unidecode is the most basic port of the
+`Text::Unidecode <http://search.cpan.org/~sburke/Text-Unidecode-0.04/lib/Text/Unidecode.pm>`_
+Perl library.
+
+There are other Python ports of Text::Unidecode (unidecode_
+and isounidecode_). unidecode_ is GPL; isounidecode_ uses too much memory,
+and it didn't support Python 3 when this package was created.
+
+You can redistribute it and/or modify this port under the terms of either:
+
+* `Artistic License`_, or
+* GPL or GPLv2+
+
+If you're OK with GPL-only, use unidecode_ (it has better memory usage and
+better transliteration quality).
+
+``text-unidecode`` supports Python 2.7 and 3.4+.
+
+.. _unidecode: https://pypi.python.org/pypi/Unidecode/
+.. _isounidecode: https://pypi.python.org/pypi/isounidecode/
+.. _Artistic License: https://opensource.org/licenses/Artistic-Perl-1.0
+
+Installation
+------------
+
+::
+
+ pip install text-unidecode
+
+Usage
+-----
+
+::
+
+ >>> from text_unidecode import unidecode
+ >>> unidecode(u'какой-то текст')
+ 'kakoi-to tekst'
+
+
diff --git a/third_party/python/text_unidecode/text_unidecode-1.3.dist-info/LICENSE.txt b/third_party/python/text_unidecode/text_unidecode-1.3.dist-info/LICENSE.txt
new file mode 100644
index 0000000000..5ed2d0fda3
--- /dev/null
+++ b/third_party/python/text_unidecode/text_unidecode-1.3.dist-info/LICENSE.txt
@@ -0,0 +1,134 @@
+text-unidecode is a free software; you can redistribute
+it and/or modify it under the terms of either:
+
+* GPL or GPLv2+ (see https://www.gnu.org/licenses/license-list.html#GNUGPL), or
+* Artistic License - see below:
+
+
+ The "Artistic License"
+
+ Preamble
+
+The intent of this document is to state the conditions under which a
+Package may be copied, such that the Copyright Holder maintains some
+semblance of artistic control over the development of the package,
+while giving the users of the package the right to use and distribute
+the Package in a more-or-less customary fashion, plus the right to make
+reasonable modifications.
+
+Definitions:
+
+ "Package" refers to the collection of files distributed by the
+ Copyright Holder, and derivatives of that collection of files
+ created through textual modification.
+
+ "Standard Version" refers to such a Package if it has not been
+ modified, or has been modified in accordance with the wishes
+ of the Copyright Holder as specified below.
+
+ "Copyright Holder" is whoever is named in the copyright or
+ copyrights for the package.
+
+ "You" is you, if you're thinking about copying or distributing
+ this Package.
+
+ "Reasonable copying fee" is whatever you can justify on the
+ basis of media cost, duplication charges, time of people involved,
+ and so on. (You will not be required to justify it to the
+ Copyright Holder, but only to the computing community at large
+ as a market that must bear the fee.)
+
+ "Freely Available" means that no fee is charged for the item
+ itself, though there may be fees involved in handling the item.
+ It also means that recipients of the item may redistribute it
+ under the same conditions they received it.
+
+1. You may make and give away verbatim copies of the source form of the
+Standard Version of this Package without restriction, provided that you
+duplicate all of the original copyright notices and associated disclaimers.
+
+2. You may apply bug fixes, portability fixes and other modifications
+derived from the Public Domain or from the Copyright Holder. A Package
+modified in such a way shall still be considered the Standard Version.
+
+3. You may otherwise modify your copy of this Package in any way, provided
+that you insert a prominent notice in each changed file stating how and
+when you changed that file, and provided that you do at least ONE of the
+following:
+
+ a) place your modifications in the Public Domain or otherwise make them
+ Freely Available, such as by posting said modifications to Usenet or
+ an equivalent medium, or placing the modifications on a major archive
+ site such as uunet.uu.net, or by allowing the Copyright Holder to include
+ your modifications in the Standard Version of the Package.
+
+ b) use the modified Package only within your corporation or organization.
+
+ c) rename any non-standard executables so the names do not conflict
+ with standard executables, which must also be provided, and provide
+ a separate manual page for each non-standard executable that clearly
+ documents how it differs from the Standard Version.
+
+ d) make other distribution arrangements with the Copyright Holder.
+
+4. You may distribute the programs of this Package in object code or
+executable form, provided that you do at least ONE of the following:
+
+ a) distribute a Standard Version of the executables and library files,
+ together with instructions (in the manual page or equivalent) on where
+ to get the Standard Version.
+
+ b) accompany the distribution with the machine-readable source of
+ the Package with your modifications.
+
+ c) give non-standard executables non-standard names, and clearly
+ document the differences in manual pages (or equivalent), together
+ with instructions on where to get the Standard Version.
+
+ d) make other distribution arrangements with the Copyright Holder.
+
+5. You may charge a reasonable copying fee for any distribution of this
+Package. You may charge any fee you choose for support of this
+Package. You may not charge a fee for this Package itself. However,
+you may distribute this Package in aggregate with other (possibly
+commercial) programs as part of a larger (possibly commercial) software
+distribution provided that you do not advertise this Package as a
+product of your own. You may embed this Package's interpreter within
+an executable of yours (by linking); this shall be construed as a mere
+form of aggregation, provided that the complete Standard Version of the
+interpreter is so embedded.
+
+6. The scripts and library files supplied as input to or produced as
+output from the programs of this Package do not automatically fall
+under the copyright of this Package, but belong to whoever generated
+them, and may be sold commercially, and may be aggregated with this
+Package. If such scripts or library files are aggregated with this
+Package via the so-called "undump" or "unexec" methods of producing a
+binary executable image, then distribution of such an image shall
+neither be construed as a distribution of this Package nor shall it
+fall under the restrictions of Paragraphs 3 and 4, provided that you do
+not represent such an executable image as a Standard Version of this
+Package.
+
+7. C subroutines (or comparably compiled subroutines in other
+languages) supplied by you and linked into this Package in order to
+emulate subroutines and variables of the language defined by this
+Package shall not be considered part of this Package, but are the
+equivalent of input as in Paragraph 6, provided these subroutines do
+not change the language in any way that would cause it to fail the
+regression tests for the language.
+
+8. Aggregation of this Package with a commercial distribution is always
+permitted provided that the use of this Package is embedded; that is,
+when no overt attempt is made to make this Package's interfaces visible
+to the end user of the commercial distribution. Such use shall not be
+construed as a distribution of this Package.
+
+9. The name of the Copyright Holder may not be used to endorse or promote
+products derived from this software without specific prior written permission.
+
+10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+ The End
diff --git a/third_party/python/text_unidecode/text_unidecode-1.3.dist-info/METADATA b/third_party/python/text_unidecode/text_unidecode-1.3.dist-info/METADATA
new file mode 100644
index 0000000000..23bd3d45bd
--- /dev/null
+++ b/third_party/python/text_unidecode/text_unidecode-1.3.dist-info/METADATA
@@ -0,0 +1,73 @@
+Metadata-Version: 2.0
+Name: text-unidecode
+Version: 1.3
+Summary: The most basic Text::Unidecode port
+Home-page: https://github.com/kmike/text-unidecode/
+Author: Mikhail Korobov
+Author-email: kmike84@gmail.com
+License: Artistic License
+Platform: UNKNOWN
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: Artistic License
+Classifier: License :: OSI Approved :: GNU General Public License (GPL)
+Classifier: License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 2
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: Implementation :: CPython
+Classifier: Programming Language :: Python :: Implementation :: PyPy
+Classifier: Topic :: Software Development :: Libraries :: Python Modules
+Classifier: Topic :: Text Processing :: Linguistic
+
+Text-Unidecode
+==============
+
+.. image:: https://travis-ci.org/kmike/text-unidecode.svg?branch=master
+ :target: https://travis-ci.org/kmike/text-unidecode
+ :alt: Build Status
+
+text-unidecode is the most basic port of the
+`Text::Unidecode <http://search.cpan.org/~sburke/Text-Unidecode-0.04/lib/Text/Unidecode.pm>`_
+Perl library.
+
+There are other Python ports of Text::Unidecode (unidecode_
+and isounidecode_). unidecode_ is GPL; isounidecode_ uses too much memory,
+and it didn't support Python 3 when this package was created.
+
+You can redistribute it and/or modify this port under the terms of either:
+
+* `Artistic License`_, or
+* GPL or GPLv2+
+
+If you're OK with GPL-only, use unidecode_ (it has better memory usage and
+better transliteration quality).
+
+``text-unidecode`` supports Python 2.7 and 3.4+.
+
+.. _unidecode: https://pypi.python.org/pypi/Unidecode/
+.. _isounidecode: https://pypi.python.org/pypi/isounidecode/
+.. _Artistic License: https://opensource.org/licenses/Artistic-Perl-1.0
+
+Installation
+------------
+
+::
+
+ pip install text-unidecode
+
+Usage
+-----
+
+::
+
+ >>> from text_unidecode import unidecode
+ >>> unidecode(u'какой-то текст')
+ 'kakoi-to tekst'
+
+
diff --git a/third_party/python/text_unidecode/text_unidecode-1.3.dist-info/RECORD b/third_party/python/text_unidecode/text_unidecode-1.3.dist-info/RECORD
new file mode 100644
index 0000000000..909fae9e17
--- /dev/null
+++ b/third_party/python/text_unidecode/text_unidecode-1.3.dist-info/RECORD
@@ -0,0 +1,9 @@
+text_unidecode/__init__.py,sha256=_hESqlvGR_cTy0oryPuoyrVntCOIID7bHDA-y22I1ig,484
+text_unidecode/data.bin,sha256=eSRmbaTOCtJNS4FCszDm2OiUZc2IOTRyTNnkt9gTDwk,311077
+text_unidecode-1.3.dist-info/DESCRIPTION.rst,sha256=6Fgx54K_UeXRByELmqkfLcHlbXhsvNNJdkPFT0VF0J0,1199
+text_unidecode-1.3.dist-info/LICENSE.txt,sha256=OTjnU1w-TvfmNj3ptpP-O6_jxKXl9JJc1IN1CW_nr9U,6535
+text_unidecode-1.3.dist-info/METADATA,sha256=B9j-1l4-yN9P5e8mpBrXCqAQsRUnA4Izyy0hG7Jyrn4,2422
+text_unidecode-1.3.dist-info/RECORD,,
+text_unidecode-1.3.dist-info/WHEEL,sha256=o2k-Qa-RMNIJmUdIc7KU6VWR_ErNRbWNlxDIpl7lm34,110
+text_unidecode-1.3.dist-info/metadata.json,sha256=vYPs2_8Q45eS8mrUw0qzf1NeShHDuX_lpyh8S3yqg9U,1299
+text_unidecode-1.3.dist-info/top_level.txt,sha256=SQH9SRjWlLrD-XgHyQOPtDQg_DaBt3Gt6hiMSNwHbuE,15
diff --git a/third_party/python/text_unidecode/text_unidecode-1.3.dist-info/WHEEL b/third_party/python/text_unidecode/text_unidecode-1.3.dist-info/WHEEL
new file mode 100644
index 0000000000..8b6dd1b5a8
--- /dev/null
+++ b/third_party/python/text_unidecode/text_unidecode-1.3.dist-info/WHEEL
@@ -0,0 +1,6 @@
+Wheel-Version: 1.0
+Generator: bdist_wheel (0.29.0)
+Root-Is-Purelib: true
+Tag: py2-none-any
+Tag: py3-none-any
+
diff --git a/third_party/python/text_unidecode/text_unidecode-1.3.dist-info/metadata.json b/third_party/python/text_unidecode/text_unidecode-1.3.dist-info/metadata.json
new file mode 100644
index 0000000000..3d8b506b3d
--- /dev/null
+++ b/third_party/python/text_unidecode/text_unidecode-1.3.dist-info/metadata.json
@@ -0,0 +1 @@
+{"classifiers": ["Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: Artistic License", "License :: OSI Approved :: GNU General Public License (GPL)", "License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Text Processing :: Linguistic"], "extensions": {"python.details": {"contacts": [{"email": "kmike84@gmail.com", "name": "Mikhail Korobov", "role": "author"}], "document_names": {"description": "DESCRIPTION.rst", "license": "LICENSE.txt"}, "project_urls": {"Home": "https://github.com/kmike/text-unidecode/"}}}, "generator": "bdist_wheel (0.29.0)", "license": "Artistic License", "metadata_version": "2.0", "name": "text-unidecode", "summary": "The most basic Text::Unidecode port", "version": "1.3"} \ No newline at end of file
diff --git a/third_party/python/text_unidecode/text_unidecode-1.3.dist-info/top_level.txt b/third_party/python/text_unidecode/text_unidecode-1.3.dist-info/top_level.txt
new file mode 100644
index 0000000000..2f7a53e38a
--- /dev/null
+++ b/third_party/python/text_unidecode/text_unidecode-1.3.dist-info/top_level.txt
@@ -0,0 +1 @@
+text_unidecode
diff --git a/third_party/python/text_unidecode/text_unidecode/__init__.py b/third_party/python/text_unidecode/text_unidecode/__init__.py
new file mode 100644
index 0000000000..80282c74a2
--- /dev/null
+++ b/third_party/python/text_unidecode/text_unidecode/__init__.py
@@ -0,0 +1,21 @@
+# -*- coding: utf-8 -*-
+from __future__ import absolute_import, unicode_literals
+import os
+import pkgutil
+
+_replaces = pkgutil.get_data(__name__, 'data.bin').decode('utf8').split('\x00')
+
+def unidecode(txt):
+ chars = []
+ for ch in txt:
+ codepoint = ord(ch)
+
+ if not codepoint:
+ chars.append('\x00')
+ continue
+
+ try:
+ chars.append(_replaces[codepoint-1])
+ except IndexError:
+ pass
+ return "".join(chars)
diff --git a/third_party/python/text_unidecode/text_unidecode/data.bin b/third_party/python/text_unidecode/text_unidecode/data.bin
new file mode 100644
index 0000000000..523d4898e8
--- /dev/null
+++ b/third_party/python/text_unidecode/text_unidecode/data.bin
Binary files differ