Metadata-Version: 2.1
Name: icu_tokenizer
Version: 0.0.1
Summary: ICU based universal language tokenizer
Home-page: https://github.com/mingruimingrui/ICU-tokenizer
Author: Wang Ming Rui
Author-email: mingruimingrui@hotmail.com
License: MIT License
Description: **ICU-tokenizer** is a python package used to perform universal language
        normalization and tokenization using the International Components for
        Unicode.
        
        - [Install](#install)
        - [Usage (Python)](#usage-python)
          - [Sentence splitter](#sentence-splitter)
          - [Normalizer](#normalizer)
          - [Tokenizer](#tokenizer)
        
        ## Install
        
        See [./INSTALL.md](./INSTALL.md)
        
        ## Usage (Python)
        
        ### Sentence splitter
        
        ```py
        # To split a paragraph into multiple sentences
        >>> from icu_tokenizer import SentSplitter
        >>> splitter = SentSplitter('zh')
        
        >>> paragraph = """
        美国最高法院（英语：Supreme Court of the United States），一般是指美国联邦最高法院，是美国最高级别的联邦法院，为美国三权继总统、国会后最为重要的一环。根据1789年《美国宪法第三条》的规定，最高法院对所有联邦法院、州法院和涉及联邦法律问题的诉讼案件具有最终（并且在很大程度上是有斟酌决定权的）上诉管辖权，以及对小范围案件的具有初审管辖权。在美国的法律制度中，最高法院通常是包括《美国宪法》在内的联邦法律的最终解释者，但仅在具有管辖权的案件范围内。法院不享有判定政治问题的权力；政治问题的执法机关是行政机关，而不是政府的司法部门。
        """
        >>> splitter.split(paragraph)
        [
            '美国最高法院（英语：Supreme Court of the United States），一般是指美国联邦最高法院，是美国最高级别的联邦法院，为美国三权继总统、国会后最为重要的一环。',
            '根据1789年《美国宪法第三条》的规定，最高法院对所有联邦法院、州法院和涉及联邦法律问题的诉讼案件具有最终（并且在很大程度上是有斟酌决定权的）上诉管辖权，以及对小范围案件的具有初审管辖权。',
            '在美国的法律制度中，最高法院通常是包括《美国宪法》在内的联邦法律的最终解释者，但仅在具有管辖权的案件范围内。',
            '法院不享有判定政治问题的权力；政治问题的执法机关是行政机关，而不是政府的司法部门。'
        ]
        ```
        
        ### Normalizer
        
        ```py
        # To normalize text
        >>> from icu_tokenizer import Normalizer
        >>> normalizer = Normalizer(lang='en', norm_puncts=True)
        
        >>> text = "𝑻𝒉𝒆 𝒑𝒓𝒐𝒅𝒖𝒄𝒕𝒔 𝒚𝒐𝒖 𝒐𝒓𝒅𝒆𝒓𝒆𝒅 𝒘𝒊𝒍𝒍 𝒃𝒆 𝒔𝒉𝒊𝒑𝒑𝒆𝒅 𝒅𝒊𝒓𝒆𝒄𝒕𝒍𝒚 𝒇𝒓𝒐𝒎 𝑲𝒐𝒓𝒆𝒂."
        >>> normalizer.normalize(text)
        "The products you ordered will be shipped directly from Korea."
        
        >>> text = "【】（）"
        >>> normalizer.normalize(text)
        "[]()"
        ```
        
        ### Tokenizer
        
        ```py
        >>> from icu_tokenizer import Tokenizer
        >>> tokenizer = Tokenizer(lang='th')
        
        >>> text = "ภาษาไทยเป็นภาษาที่มีระดับเสียงของคำแน่นอนหรือวรรณยุกต์เช่นเดียวกับภาษาจีน และออกเสียงแยกคำต่อคำ"
        >>> tokenizer.tokenize(text)
        ['ภาษา', 'ไทย', 'เป็น', 'ภาษา', 'ที่', 'มี', 'ระดับ', 'เสียง', 'ของ', 'คำ', 'แน่นอน', 'หรือ', 'วรรณยุกต์', 'เช่น', 'เดียว', 'กับ', 'ภาษา', 'จีน', 'และ', 'ออก', 'เสียง', 'แยก', 'คำ', 'ต่อ', 'คำ']
        ```
        
Platform: UNKNOWN
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: License :: OSI Approved :: MIT License
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Localization
Description-Content-Type: text/markdown
