[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"tool-undertheseanlp--underthesea":3,"similar-undertheseanlp--underthesea":230},{"id":4,"github_repo":5,"name":6,"description_en":7,"description_zh":8,"ai_summary_zh":8,"readme_en":9,"readme_zh":10,"quickstart_zh":11,"use_case_zh":12,"hero_image_url":13,"owner_login":14,"owner_name":15,"owner_avatar_url":16,"owner_bio":17,"owner_company":18,"owner_location":18,"owner_email":19,"owner_twitter":18,"owner_website":20,"owner_url":21,"languages":22,"stars":63,"forks":64,"last_commit_at":65,"license":66,"difficulty_score":67,"env_os":68,"env_gpu":68,"env_ram":68,"env_deps":69,"category_tags":73,"github_topics":80,"view_count":96,"oss_zip_url":18,"oss_zip_packed_at":18,"status":97,"created_at":98,"updated_at":99,"faqs":100,"releases":130},728,"undertheseanlp\u002Funderthesea","underthesea","Underthesea - Vietnamese NLP Toolkit","Underthesea 是一款专注于越南语的自然语言处理（NLP）开源工具包。它致力于解决越南语文本在计算机处理中面临的标准化难题，为相关领域提供了一整套易用的 Python 模块、数据集及教程。\n\n通过简洁的 API 接口，Underthesea 能让开发者快速集成预训练模型，实现句子分割、分词、词性标注、命名实体识别及依存句法分析等核心任务。其独特之处在于内置了针对越南语特性的文本规范化与地址转换功能，能有效处理拼写错误和地址格式不统一的问题。此外，最新版本 v9.1.5 还引入了对话式 AI 代理，支持通过自然语言交互调用 NLP 能力。\n\n无论是从事越南语研究的学者，还是希望构建越南语智能应用的开发者，都能从中受益。支持通过 pip 一键安装，并可按需扩展深度学习或语音合成模块。Underthesea 凭借其完善的生态和友好的社区支持，成为处理越南语数据的首选利器之一。","\u003Cp align=\"center\">\n  \u003Cbr>\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fundertheseanlp_underthesea_readme_3c2dda4cc78e.png\"\u002F>\n  \u003Cbr\u002F>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fpypi.python.org\u002Fpypi\u002Funderthesea\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Funderthesea.svg\">\n  \u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fpypi.python.org\u002Fpypi\u002Funderthesea\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fpython-3.10%20%7C%203.11%20%7C%203.12%20%7C%203.13%20%7C%203.14-blue\">\n  \u003C\u002Fa>\n  \u003Ca href=\"http:\u002F\u002Fundertheseanlp.com\u002F\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fdemo-live-brightgreen\">\n  \u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fundertheseanlp.github.io\u002Funderthesea\u002F\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fdocs-live-brightgreen\">\n  \u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1gD8dSMSE_uNacW4qJ-NSnvRT85xo9ZY2\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fcolab-ff9f01?logo=google-colab&logoColor=white\">\n  \u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fwww.facebook.com\u002Fundertheseanlp\u002F\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FFacebook-1877F2?logo=facebook&logoColor=white\">\n  \u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fwww.youtube.com\u002Fchannel\u002FUC9Jv1Qg49uprg6SjkyAqs9A\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FYouTube-FF0000?logo=youtube&logoColor=white\">\n  \u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cbr\u002F>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea\u002Fblob\u002Fmain\u002Fdocs\u002Fcontribute\u002FSPONSORS.md\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fsponsors-6-red?style=social&logo=GithubSponsors\">\n  \u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Ch3 align=\"center\">\nOpen-source Vietnamese Natural Language Process Toolkit\n\u003C\u002Fh3>\n\n`Underthesea` is:\n\n🌊 **A Vietnamese NLP toolkit.** Underthesea is a suite of open source Python modules data sets and tutorials supporting research and development in [Vietnamese Natural Language Processing](https:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea). We provides extremely easy API to quickly apply pretrained NLP models to your Vietnamese text, such as word segmentation, part-of-speech tagging (PoS), named entity recognition (NER), text classification and dependency parsing.\n\n🎁 [**Support Us!**](#-support-us) Every bit of support helps us achieve our goals. Thank you so much. 💝💝💝\n\n🎉 **New in v9.1.5!** Conversational AI Agent is here! Use `agent(\"Xin chào\")` to chat with an AI assistant specialized in Vietnamese NLP. Supports OpenAI and Azure OpenAI. 🚀✨\n\n## Installation\n\n\nTo install underthesea, simply:\n\n```bash\n$ pip install underthesea\n✨🍰✨\n```\n\nSatisfaction, guaranteed.\n\nInstall with extras (note: use quotes in zsh):\n\n```bash\n$ pip install \"underthesea[deep]\"    # Deep learning support\n$ pip install \"underthesea[voice]\"   # Text-to-Speech support\n$ pip install \"underthesea[agent]\"   # Conversational AI agent\n```\n\n## Tutorials\n\n### Natural Language Processing\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>\u003Ca href=\"\">Sentence Segmentation\u003C\u002Fa>\u003C\u002Fb> - Breaking text into individual sentences\n\u003C\u002Fsummary>\n\n- Usage\n\n    ```python\n    >>> from underthesea import sent_tokenize\n    >>> text = 'Taylor cho biết lúc đầu cô cảm thấy ngại với cô bạn thân Amanda nhưng rồi mọi thứ trôi qua nhanh chóng. Amanda cũng thoải mái với mối quan hệ này.'\n\n    >>> sent_tokenize(text)\n    [\n      \"Taylor cho biết lúc đầu cô cảm thấy ngại với cô bạn thân Amanda nhưng rồi mọi thứ trôi qua nhanh chóng.\",\n      \"Amanda cũng thoải mái với mối quan hệ này.\"\n    ]\n    ```\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>\u003Ca href=\"\">Text Normalization\u003C\u002Fa>\u003C\u002Fb> - Standardizing textual data representation and address conversion\n\u003C\u002Fsummary>\n\n- Usage\n\n    ```python\n    >>> from underthesea import text_normalize\n    >>> text_normalize(\"Ðảm baỏ chất lựơng phòng thí nghịêm hoá học\")\n    \"Đảm bảo chất lượng phòng thí nghiệm hóa học\"\n    ```\n\n- Address Conversion\n\n    ```python\n    >>> from underthesea import convert_address\n    >>> result = convert_address(\"Phường Phúc Xá, Quận Ba Đình, Thành phố Hà Nội\")\n    >>> result.converted\n    \"Phường Hồng Hà, Thành phố Hà Nội\"\n    >>> result.mapping_type\n    \u003CMappingType.MERGED: 'merged'>\n    ```\n\n- Supports abbreviations\n\n    ```python\n    >>> result = convert_address(\"P. Phúc Xá, Q. Ba Đình, TP. Hà Nội\")\n    >>> result.converted\n    \"Phường Hồng Hà, Thành phố Hà Nội\"\n    ```\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>\u003Ca href=\"\">Tagging\u003C\u002Fa>\u003C\u002Fb> - Word segmentation, POS tagging, chunking, dependency parsing\n\u003C\u002Fsummary>\n\u003Cbr\u002F>\n\n- **Word Segmentation**\n\n    ```python\n    >>> from underthesea import word_tokenize\n    >>> word_tokenize(\"Chàng trai 9X Quảng Trị khởi nghiệp từ nấm sò\")\n    [\"Chàng trai\", \"9X\", \"Quảng Trị\", \"khởi nghiệp\", \"từ\", \"nấm\", \"sò\"]\n\n    >>> word_tokenize(\"Chàng trai 9X Quảng Trị khởi nghiệp từ nấm sò\", format=\"text\")\n    \"Chàng_trai 9X Quảng_Trị khởi_nghiệp từ nấm sò\"\n    ```\n\n- **POS Tagging**\n\n    ```python\n    >>> from underthesea import pos_tag\n    >>> pos_tag('Chợ thịt chó nổi tiếng ở Sài Gòn bị truy quét')\n    [('Chợ', 'N'),\n     ('thịt', 'N'),\n     ('chó', 'N'),\n     ('nổi tiếng', 'A'),\n     ('ở', 'E'),\n     ('Sài Gòn', 'Np'),\n     ('bị', 'V'),\n     ('truy quét', 'V')]\n    ```\n\n- **Chunking**\n\n    ```python\n    >>> from underthesea import chunk\n    >>> chunk('Bác sĩ bây giờ có thể thản nhiên báo tin bệnh nhân bị ung thư?')\n    [('Bác sĩ', 'N', 'B-NP'),\n     ('bây giờ', 'P', 'B-NP'),\n     ('có thể', 'R', 'O'),\n     ('thản nhiên', 'A', 'B-AP'),\n     ('báo', 'V', 'B-VP'),\n     ('tin', 'N', 'B-NP'),\n     ('bệnh nhân', 'N', 'B-NP'),\n     ('bị', 'V', 'B-VP'),\n     ('ung thư', 'N', 'B-NP'),\n     ('?', 'CH', 'O')]\n    ```\n\n- **Dependency Parsing**\n\n    ```bash\n    $ pip install underthesea[deep]\n    ```\n\n    ```python\n    >>> from underthesea import dependency_parse\n    >>> dependency_parse('Tối 29\u002F11, Việt Nam thêm 2 ca mắc Covid-19')\n    [('Tối', 5, 'obl:tmod'),\n     ('29\u002F11', 1, 'flat:date'),\n     (',', 1, 'punct'),\n     ('Việt Nam', 5, 'nsubj'),\n     ('thêm', 0, 'root'),\n     ('2', 7, 'nummod'),\n     ('ca', 5, 'obj'),\n     ('mắc', 7, 'nmod'),\n     ('Covid-19', 8, 'nummod')]\n    ```\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>\u003Ca href=\"\">Named Entity Recognition\u003C\u002Fa>\u003C\u002Fb> - Identifying named entities (e.g., names, locations)\n\u003C\u002Fsummary>\n\u003Cbr\u002F>\n\n- Usage\n\n    ```python\n    >>> from underthesea import ner\n    >>> text = 'Chưa tiết lộ lịch trình tới Việt Nam của Tổng thống Mỹ Donald Trump'\n    >>> ner(text)\n    [('Chưa', 'R', 'O', 'O'),\n     ('tiết lộ', 'V', 'B-VP', 'O'),\n     ('lịch trình', 'V', 'B-VP', 'O'),\n     ('tới', 'E', 'B-PP', 'O'),\n     ('Việt Nam', 'Np', 'B-NP', 'B-LOC'),\n     ('của', 'E', 'B-PP', 'O'),\n     ('Tổng thống', 'N', 'B-NP', 'O'),\n     ('Mỹ', 'Np', 'B-NP', 'B-LOC'),\n     ('Donald', 'Np', 'B-NP', 'B-PER'),\n     ('Trump', 'Np', 'B-NP', 'I-PER')]\n    ```\n\n- Deep Learning Model\n\n    ```bash\n    $ pip install underthesea[deep]\n    ```\n\n    ```python\n    >>> from underthesea import ner\n    >>> text = \"Bộ Công Thương xóa một tổng cục, giảm nhiều đầu mối\"\n    >>> ner(text, deep=True)\n    [\n      {'entity': 'B-ORG', 'word': 'Bộ'},\n      {'entity': 'I-ORG', 'word': 'Công'},\n      {'entity': 'I-ORG', 'word': 'Thương'}\n    ]\n    ```\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>\u003Ca href=\"\">Classification\u003C\u002Fa>\u003C\u002Fb> - Text classification and sentiment analysis\n\u003C\u002Fsummary>\n\u003Cbr\u002F>\n\n- **Text Classification**\n\n    ```python\n    >>> from underthesea import classify\n\n    >>> classify('HLV đầu tiên ở Premier League bị sa thải sau 4 vòng đấu')\n    ['The thao']\n\n    >>> classify('Hội đồng tư vấn kinh doanh Asean vinh danh giải thưởng quốc tế')\n    ['Kinh doanh']\n\n    >> classify('Lãi suất từ BIDV rất ưu đãi', domain='bank')\n    ['INTEREST_RATE']\n    ```\n\n- **Sentiment Analysis**\n\n    ```python\n    >>> from underthesea import sentiment\n\n    >>> sentiment('hàng kém chất lg,chăn đắp lên dính lông lá khắp người. thất vọng')\n    'negative'\n    >>> sentiment('Sản phẩm hơi nhỏ so với tưởng tượng nhưng chất lượng tốt, đóng gói cẩn thận.')\n    'positive'\n\n    >>> sentiment('Đky qua đường link ở bài viết này từ thứ 6 mà giờ chưa thấy ai lhe hết', domain='bank')\n    ['CUSTOMER_SUPPORT#negative']\n    >>> sentiment('Xem lại vẫn thấy xúc động và tự hào về BIDV của mình', domain='bank')\n    ['TRADEMARK#positive']\n    ```\n\n- **Prompt-based Classification**\n\n    ```bash\n    $ pip install underthesea[prompt]\n    $ export OPENAI_API_KEY=YOUR_KEY\n    ```\n\n    ```python\n    >>> from underthesea import classify\n    >>> classify(\"HLV ngoại đòi gần tỷ mỗi tháng dẫn dắt tuyển Việt Nam\", model='prompt')\n    Thể thao\n    ```\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>\u003Ca href=\"\">Lang Detect\u003C\u002Fa>\u003C\u002Fb> - Identifying the Language of Text\n\u003C\u002Fsummary>\n\n\u003Cbr\u002F>\n\nLang Detect API. Powered by [FastText](https:\u002F\u002Ffasttext.cc\u002Fdocs\u002Fen\u002Flanguage-identification.html) language identification model, using pure Rust inference via `underthesea_core`.\n\nUsage examples in script\n\n    ```python\n    >>> from underthesea import lang_detect\n\n    >>> lang_detect(\"Cựu binh Mỹ trả nhật ký nhẹ lòng khi thấy cuộc sống hòa bình tại Việt Nam\")\n    vi\n    ```\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>\u003Ca href=\"\">Translation\u003C\u002Fa>\u003C\u002Fb> - Translating Vietnamese text to English\n\u003C\u002Fsummary>\n\u003Cbr\u002F>\n\n- Deep Learning Model\n\n    ```bash\n    $ pip install underthesea[deep]\n    ```\n\n    ```python\n    >>> from underthesea import translate\n\n    >>> translate(\"Hà Nội là thủ đô của Việt Nam\")\n    'Hanoi is the capital of Vietnam'\n\n    >>> translate(\"Ẩm thực Việt Nam nổi tiếng trên thế giới\")\n    'Vietnamese cuisine is famous around the world'\n\n    >>> translate(\"I love Vietnamese food\", source_lang='en', target_lang='vi')\n    'Tôi yêu ẩm thực Việt Nam'\n    ```\n\u003C\u002Fdetails>\n\n### Voice\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>\u003Ca href=\"\">Text-to-Speech\u003C\u002Fa>\u003C\u002Fb> - Converting written text into spoken audio\n\u003C\u002Fsummary>\n\n\u003Cbr\u002F>\n\nText to Speech API. Thanks to awesome work from [NTT123\u002FvietTTS](https:\u002F\u002Fgithub.com\u002Fntt123\u002FvietTTS)\n\nInstall extend dependencies and models\n\n    ```bash\n    $ pip install \"underthesea[voice]\"\n    $ underthesea download-model VIET_TTS_V0_4_1\n    ```\n\nUsage examples in script\n\n    ```python\n    >>> from underthesea.pipeline.tts import tts\n\n    >>> tts(\"Cựu binh Mỹ trả nhật ký nhẹ lòng khi thấy cuộc sống hòa bình tại Việt Nam\")\n    A new audio file named `sound.wav` will be generated.\n    ```\n\nUsage examples in command line\n\n    ```sh\n    $ underthesea tts \"Cựu binh Mỹ trả nhật ký nhẹ lòng khi thấy cuộc sống hòa bình tại Việt Nam\"\n    ```\n\u003C\u002Fdetails>\n\n### Agents\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>\u003Ca href=\"\">Conversational AI Agent\u003C\u002Fa>\u003C\u002Fb> - Chat with AI for Vietnamese NLP tasks\n\u003C\u002Fsummary>\n\n\u003Cbr\u002F>\n\nConversational AI Agent with OpenAI and Azure OpenAI support.\n\nInstall extend dependencies\n\n    ```bash\n    $ pip install \"underthesea[agent]\"\n    $ export OPENAI_API_KEY=your_api_key\n    # Or for Azure OpenAI:\n    # export AZURE_OPENAI_API_KEY=your_key\n    # export AZURE_OPENAI_ENDPOINT=https:\u002F\u002Fxxx.openai.azure.com\n    ```\n\nUsage examples in script\n\n    ```python\n    >>> from underthesea import agent\n\n    >>> agent(\"Xin chào!\")\n    'Xin chào! Tôi có thể giúp gì cho bạn?'\n\n    >>> agent(\"NLP là gì?\")\n    'NLP (Natural Language Processing) là xử lý ngôn ngữ tự nhiên...'\n\n    >>> agent(\"Cho ví dụ về word tokenization tiếng Việt\")\n    'Word tokenization trong tiếng Việt là quá trình...'\n\n    # Reset conversation\n    >>> agent.reset()\n    ```\n\nSupports Azure OpenAI\n\n    ```python\n    >>> agent(\"Hello\", provider=\"azure\", model=\"my-gpt4-deployment\")\n    ```\n\nAgent with Custom Tools (Function Calling)\n\n    ```python\n    >>> from underthesea.agent import Agent, Tool\n\n    # Define tools as functions\n    >>> def get_weather(location: str) -> dict:\n    ...     \"\"\"Get current weather for a location.\"\"\"\n    ...     return {\"location\": location, \"temp\": 25, \"condition\": \"sunny\"}\n\n    >>> def search_news(query: str) -> str:\n    ...     \"\"\"Search Vietnamese news.\"\"\"\n    ...     return f\"Results for: {query}\"\n\n    # Create agent with tools\n    >>> my_agent = Agent(\n    ...     name=\"assistant\",\n    ...     tools=[\n    ...         Tool(get_weather, description=\"Get weather for a city\"),\n    ...         Tool(search_news, description=\"Search Vietnamese news\"),\n    ...     ],\n    ...     instruction=\"You are a helpful Vietnamese assistant.\"\n    ... )\n\n    # Agent automatically calls tools when needed\n    >>> my_agent(\"Thời tiết ở Hà Nội thế nào?\")\n    'Thời tiết ở Hà Nội hiện tại là 25°C và nắng.'\n\n    >>> my_agent.reset()  # Clear conversation history\n    ```\n\nUsing Default Tools (like LangChain\u002FOpenAI tools)\n\n    ```python\n    >>> from underthesea.agent import Agent, default_tools\n\n    # Create agent with built-in tools:\n    # calculator, datetime, web_search, wikipedia, shell, python, file ops...\n    >>> my_agent = Agent(\n    ...     name=\"assistant\",\n    ...     tools=default_tools,\n    ... )\n\n    >>> my_agent(\"What time is it?\")           # Uses datetime tool\n    >>> my_agent(\"Calculate sqrt(144) + 10\")   # Uses calculator tool\n    >>> my_agent(\"Search for Python tutorials\") # Uses web_search tool\n    ```\n\u003C\u002Fdetails>\n\n### Resources\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>\u003Ca href=\"\">Vietnamese NLP Resources\u003C\u002Fa>\u003C\u002Fb>\u003C\u002Fsummary>\n\n\u003Cbr\u002F>\n\nList resources\n\n```bash\n$ underthesea list-data\n| Name                      | Type        | License | Year | Directory                          |\n|---------------------------+-------------+---------+------+------------------------------------|\n| CP_Vietnamese_VLC_v2_2022 | Plaintext   | Open    | 2023 | datasets\u002FCP_Vietnamese_VLC_v2_2022 |\n| UIT_ABSA_RESTAURANT       | Sentiment   | Open    | 2021 | datasets\u002FUIT_ABSA_RESTAURANT       |\n| UIT_ABSA_HOTEL            | Sentiment   | Open    | 2021 | datasets\u002FUIT_ABSA_HOTEL            |\n| SE_Vietnamese-UBS         | Sentiment   | Open    | 2020 | datasets\u002FSE_Vietnamese-UBS         |\n| CP_Vietnamese-UNC         | Plaintext   | Open    | 2020 | datasets\u002FCP_Vietnamese-UNC         |\n| DI_Vietnamese-UVD         | Dictionary  | Open    | 2020 | datasets\u002FDI_Vietnamese-UVD         |\n| UTS2017-BANK              | Categorized | Open    | 2017 | datasets\u002FUTS2017-BANK              |\n| VNTQ_SMALL                | Plaintext   | Open    | 2012 | datasets\u002FLTA                       |\n| VNTQ_BIG                  | Plaintext   | Open    | 2012 | datasets\u002FLTA                       |\n| VNESES                    | Plaintext   | Open    | 2012 | datasets\u002FLTA                       |\n| VNTC                      | Categorized | Open    | 2007 | datasets\u002FVNTC                      |\n\n$ underthesea list-data --all\n```\n\nDownload resources\n\n```bash\n$ underthesea download-data CP_Vietnamese_VLC_v2_2022\nResource CP_Vietnamese_VLC_v2_2022 is downloaded in ~\u002F.underthesea\u002Fdatasets\u002FCP_Vietnamese_VLC_v2_2022 folder\n```\n\n\u003C\u002Fdetails>\n\n### Up Coming Features\n\n* Automatic Speech Recognition\n\n## Contributing\n\nDo you want to contribute with underthesea development? Great! Please read more details at [Contributing Guide](https:\u002F\u002Fundertheseanlp.github.io\u002Funderthesea\u002Fdocs\u002Fdeveloper\u002Fcontributing)\n\n## 💝 Support Us\n\nIf you found this project helpful and would like to support our work, you can just buy us a coffee ☕.\n\nYour support is our biggest encouragement 🎁!\n\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fundertheseanlp_underthesea_readme_b58fa2b6edf1.png\"\u002F>\n","\u003Cp align=\"center\">\n  \u003Cbr>\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fundertheseanlp_underthesea_readme_3c2dda4cc78e.png\"\u002F>\n  \u003Cbr\u002F>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fpypi.python.org\u002Fpypi\u002Funderthesea\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Funderthesea.svg\">\n  \u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fpypi.python.org\u002Fpypi\u002Funderthesea\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fpython-3.10%20%7C%203.11%20%7C%203.12%20%7C%203.13%20%7C%203.14-blue\">\n  \u003C\u002Fa>\n  \u003Ca href=\"http:\u002F\u002Fundertheseanlp.com\u002F\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fdemo-live-brightgreen\">\n  \u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fundertheseanlp.github.io\u002Funderthesea\u002F\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fdocs-live-brightgreen\">\n  \u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1gD8dSMSE_uNacW4qJ-NSnvRT85xo9ZY2\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fcolab-ff9f01?logo=google-colab&logoColor=white\">\n  \u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fwww.facebook.com\u002Fundertheseanlp\u002F\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FFacebook-1877F2?logo=facebook&logoColor=white\">\n  \u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fwww.youtube.com\u002Fchannel\u002FUC9Jv1Qg49uprg6SjkyAqs9A\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FYouTube-FF0000?logo=youtube&logoColor=white\">\n  \u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cbr\u002F>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea\u002Fblob\u002Fmain\u002Fdocs\u002Fcontribute\u002FSPONSORS.md\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fsponsors-6-red?style=social&logo=GithubSponsors\">\n  \u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Ch3 align=\"center\">\n开源越南语自然语言处理工具包\n\u003C\u002Fh3>\n\n`Underthesea` 是：\n\n🌊 **一个越南语 NLP（自然语言处理）工具包。** Underthesea 是一套开源的 Python 模块、数据集和教程套件，支持 [越南语自然语言处理](https:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea) 的研究与开发。我们提供极其简单的 API（应用程序编程接口），可快速将预训练的 NLP 模型应用于您的越南语文本，例如分词、词性标注（PoS）、命名实体识别（NER）、文本分类和依存句法分析。\n\n🎁 [**支持我们！**](#-support-us) 每一份支持都帮助我们实现目标。非常感谢。💝💝💝\n\n🎉 **v9.1.5 新功能！** 对话式 AI 助手已上线！使用 `agent(\"Xin chào\")` 与专注于越南语 NLP 的 AI 助手聊天。支持 OpenAI 和 Azure OpenAI。🚀✨\n\n## 安装\n\n要安装 underthesea，只需：\n\n```bash\n$ pip install underthesea\n✨🍰✨\n```\n\n保证让您满意。\n\n安装额外组件（注意：在 zsh 中使用引号）：\n\n```bash\n$ pip install \"underthesea[deep]\"    # Deep learning support\n$ pip install \"underthesea[voice]\"   # Text-to-Speech support\n$ pip install \"underthesea[agent]\"   # Conversational AI agent\n```\n\n## 教程\n\n### 自然语言处理 (Natural Language Processing)\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>\u003Ca href=\"\">句子分割 (Sentence Segmentation)\u003C\u002Fa>\u003C\u002Fb> - 将文本拆分为单个句子\n\u003C\u002Fsummary>\n\n- 用法\n\n    ```python\n    >>> from underthesea import sent_tokenize\n    >>> text = 'Taylor cho biết lúc đầu cô cảm thấy ngại với cô bạn thân Amanda nhưng rồi mọi thứ trôi qua nhanh chóng. Amanda cũng thoải mái với mối quan hệ này.'\n\n    >>> sent_tokenize(text)\n    [\n      \"Taylor cho biết lúc đầu cô cảm thấy ngại với cô bạn thân Amanda nhưng rồi mọi thứ trôi qua nhanh chóng.\",\n      \"Amanda cũng thoải mái với mối quan hệ này.\"\n    ]\n    ```\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>\u003Ca href=\"\">文本规范化 (Text Normalization)\u003C\u002Fa>\u003C\u002Fb> - 标准化文本数据表示和地址转换\n\u003C\u002Fsummary>\n\n- 用法\n\n    ```python\n    >>> from underthesea import text_normalize\n    >>> text_normalize(\"Ðảm baỏ chất lựơng phòng thí nghịêm hoá học\")\n    \"Đảm bảo chất lượng phòng thí nghiệm hóa học\"\n    ```\n\n- 地址转换 (Address Conversion)\n\n    ```python\n    >>> from underthesea import convert_address\n    >>> result = convert_address(\"Phường Phúc Xá, Quận Ba Đình, Thành phố Hà Nội\")\n    >>> result.converted\n    \"Phường Hồng Hà, Thành phố Hà Nội\"\n    >>> result.mapping_type\n    \u003CMappingType.MERGED: 'merged'>\n    ```\n\n- 支持缩写\n\n    ```python\n    >>> result = convert_address(\"P. Phúc Xá, Q. Ba Đình, TP. Hà Nội\")\n    >>> result.converted\n    \"Phường Hồng Hà, Thành phố Hà Nội\"\n    ```\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>\u003Ca href=\"\">标注 (Tagging)\u003C\u002Fa>\u003C\u002Fb> - 分词 (Word Segmentation)、词性标注 (POS tagging)、块抽取 (chunking)、依存句法分析 (dependency parsing)\n\u003C\u002Fsummary>\n\u003Cbr\u002F>\n\n- **分词 (Word Segmentation)**\n\n    ```python\n    >>> from underthesea import word_tokenize\n    >>> word_tokenize(\"Chàng trai 9X Quảng Trị khởi nghiệp từ nấm sò\")\n    [\"Chàng trai\", \"9X\", \"Quảng Trị\", \"khởi nghiệp\", \"từ\", \"nấm\", \"sò\"]\n\n    >>> word_tokenize(\"Chàng trai 9X Quảng Trị khởi nghiệp từ nấm sò\", format=\"text\")\n    \"Chàng_trai 9X Quảng_Trị khởi_nghiệp từ nấm sò\"\n    ```\n\n- **词性标注 (POS tagging)**\n\n    ```python\n    >>> from underthesea import pos_tag\n    >>> pos_tag('Chợ thịt chó nổi tiếng ở Sài Gòn bị truy quét')\n    [('Chợ', 'N'),\n     ('thịt', 'N'),\n     ('chó', 'N'),\n     ('nổi tiếng', 'A'),\n     ('ở', 'E'),\n     ('Sài Gòn', 'Np'),\n     ('bị', 'V'),\n     ('truy quét', 'V')]\n    ```\n\n- **块抽取 (chunking)**\n\n    ```python\n    >>> from underthesea import chunk\n    >>> chunk('Bác sĩ bây giờ có thể thản nhiên báo tin bệnh nhân bị ung thư?')\n    [('Bác sĩ', 'N', 'B-NP'),\n     ('bây giờ', 'P', 'B-NP'),\n     ('có thể', 'R', 'O'),\n     ('thản nhiên', 'A', 'B-AP'),\n     ('báo', 'V', 'B-VP'),\n     ('tin', 'N', 'B-NP'),\n     ('bệnh nhân', 'N', 'B-NP'),\n     ('bị', 'V', 'B-VP'),\n     ('ung thư', 'N', 'B-NP'),\n     ('?', 'CH', 'O')]\n    ```\n\n- **依存句法分析 (dependency parsing)**\n\n    ```bash\n    $ pip install underthesea[deep]\n    ```\n\n    ```python\n    >>> from underthesea import dependency_parse\n    >>> dependency_parse('Tối 29\u002F11, Việt Nam thêm 2 ca mắc Covid-19')\n    [('Tối', 5, 'obl:tmod'),\n     ('29\u002F11', 1, 'flat:date'),\n     (',', 1, 'punct'),\n     ('Việt Nam', 5, 'nsubj'),\n     ('thêm', 0, 'root'),\n     ('2', 7, 'nummod'),\n     ('ca', 5, 'obj'),\n     ('mắc', 7, 'nmod'),\n     ('Covid-19', 8, 'nummod')]\n    ```\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>\u003Ca href=\"\">命名实体识别 (Named Entity Recognition)\u003C\u002Fa>\u003C\u002Fb> - 识别命名实体（例如：人名、地名）\n\u003C\u002Fsummary>\n\u003Cbr\u002F>\n\n- 用法\n\n    ```python\n    >>> from underthesea import ner\n    >>> text = 'Chưa tiết lộ lịch trình tới Việt Nam của Tổng thống Mỹ Donald Trump'\n    >>> ner(text)\n    [('Chưa', 'R', 'O', 'O'),\n     ('tiết lộ', 'V', 'B-VP', 'O'),\n     ('lịch trình', 'V', 'B-VP', 'O'),\n     ('tới', 'E', 'B-PP', 'O'),\n     ('Việt Nam', 'Np', 'B-NP', 'B-LOC'),\n     ('của', 'E', 'B-PP', 'O'),\n     ('Tổng thống', 'N', 'B-NP', 'O'),\n     ('Mỹ', 'Np', 'B-NP', 'B-LOC'),\n     ('Donald', 'Np', 'B-NP', 'B-PER'),\n     ('Trump', 'Np', 'B-NP', 'I-PER')]\n    ```\n\n- 深度学习模型 (Deep Learning Model)\n\n    ```bash\n    $ pip install underthesea[deep]\n    ```\n\n    ```python\n    >>> from underthesea import ner\n    >>> text = \"Bộ Công Thương xóa một tổng cục, giảm nhiều đầu mối\"\n    >>> ner(text, deep=True)\n    [\n      {'entity': 'B-ORG', 'word': 'Bộ'},\n      {'entity': 'I-ORG', 'word': 'Công'},\n      {'entity': 'I-ORG', 'word': 'Thương'}\n    ]\n    ```\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>\u003Ca href=\"\">分类 (Classification)\u003C\u002Fa>\u003C\u002Fb> - 文本分类 (Text Classification) 和情感分析 (Sentiment Analysis)\n\u003C\u002Fsummary>\n\u003Cbr\u002F>\n\n- **文本分类 (Text Classification)**\n\n    ```python\n    >>> from underthesea import classify\n\n    >>> classify('HLV đầu tiên ở Premier League bị sa thải sau 4 vòng đấu')\n    ['The thao']\n\n    >>> classify('Hội đồng tư vấn kinh doanh Asean vinh danh giải thưởng quốc tế')\n    ['Kinh doanh']\n\n    >> classify('Lãi suất từ BIDV rất ưu đãi', domain='bank')\n    ['INTEREST_RATE']\n    ```\n\n- **情感分析 (Sentiment Analysis)**\n\n    ```python\n    >>> from underthesea import sentiment\n\n    >>> sentiment('hàng kém chất lg,chăn đắp lên dính lông lá khắp người. thất vọng')\n    'negative'\n    >>> sentiment('Sản phẩm hơi nhỏ so với tưởng tượng nhưng chất lượng tốt, đóng gói cẩn thận.')\n    'positive'\n\n    >>> sentiment('Đky qua đường link ở bài viết này từ thứ 6 mà giờ chưa thấy ai lhe hết', domain='bank')\n    ['CUSTOMER_SUPPORT#negative']\n    >>> sentiment('Xem lại vẫn thấy xúc động và tự hào về BIDV của mình', domain='bank')\n    ['TRADEMARK#positive']\n    ```\n\n- **基于提示的分类 (Prompt-based Classification)**\n\n    ```bash\n    $ pip install underthesea[prompt]\n    $ export OPENAI_API_KEY=YOUR_KEY\n    ```\n\n    ```python\n    >>> from underthesea import classify\n    >>> classify(\"HLV ngoại đòi gần tỷ mỗi tháng dẫn dắt tuyển Việt Nam\", model='prompt')\n    Thể thao\n    ```\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>\u003Ca href=\"\">语言检测 (Lang Detect)\u003C\u002Fa>\u003C\u002Fb> - 识别文本的语言\n\u003C\u002Fsummary>\n\n\u003Cbr\u002F>\n\nLang Detect 应用程序接口 (API)。由 [FastText](https:\u002F\u002Ffasttext.cc\u002Fdocs\u002Fen\u002Flanguage-identification.html) 语言识别模型提供支持，通过 `underthesea_core` 使用纯 Rust 进行推理。\n\n脚本中的用法示例\n\n    ```python\n    >>> from underthesea import lang_detect\n\n    >>> lang_detect(\"Cựu binh Mỹ trả nhật ký nhẹ lòng khi thấy cuộc sống hòa bình tại Việt Nam\")\n    vi\n    ```\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>\u003Ca href=\"\">翻译 (Translation)\u003C\u002Fa>\u003C\u002Fb> - 将越南语文本翻译成英语\n\u003C\u002Fsummary>\n\u003Cbr\u002F>\n\n- 深度学习模型 (Deep Learning Model)\n\n    ```bash\n    $ pip install underthesea[deep]\n    ```\n\n    ```python\n    >>> from underthesea import translate\n\n    >>> translate(\"Hà Nội là thủ đô của Việt Nam\")\n    'Hanoi is the capital of Vietnam'\n\n    >>> translate(\"Ẩm thực Việt Nam nổi tiếng trên thế giới\")\n    'Vietnamese cuisine is famous around the world'\n\n    >>> translate(\"I love Vietnamese food\", source_lang='en', target_lang='vi')\n    'Tôi yêu ẩm thực Việt Nam'\n    ```\n\u003C\u002Fdetails>\n\n### 语音\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>\u003Ca href=\"\">文本转语音 (TTS)\u003C\u002Fa>\u003C\u002Fb> - 将书面文本转换为语音音频\n\u003C\u002Fsummary>\n\n\u003Cbr\u002F>\n\n文本转语音 API。感谢 [NTT123\u002FvietTTS](https:\u002F\u002Fgithub.com\u002Fntt123\u002FvietTTS) 的出色工作\n\n安装扩展依赖和模型\n\n    ```bash\n    $ pip install \"underthesea[voice]\"\n    $ underthesea download-model VIET_TTS_V0_4_1\n    ```\n\n脚本中的使用示例\n\n    ```python\n    >>> from underthesea.pipeline.tts import tts\n\n    >>> tts(\"Cựu binh Mỹ trả nhật ký nhẹ lòng khi thấy cuộc sống hòa bình tại Việt Nam\")\n    A new audio file named `sound.wav` will be generated.\n    ```\n\n命令行中的使用示例\n\n    ```sh\n    $ underthesea tts \"Cựu binh Mỹ trả nhật ký nhẹ lòng khi thấy cuộc sống hòa bình tại Việt Nam\"\n    ```\n\u003C\u002Fdetails>\n\n### 智能体\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>\u003Ca href=\"\">对话式 AI 智能体\u003C\u002Fa>\u003C\u002Fb> - 与 AI 聊天以进行越南语自然语言处理 (NLP) 任务\n\u003C\u002Fsummary>\n\n\u003Cbr\u002F>\n\n支持 OpenAI 和 Azure OpenAI 的对话式 AI 智能体。\n\n安装扩展依赖\n\n    ```bash\n    $ pip install \"underthesea[agent]\"\n    $ export OPENAI_API_KEY=your_api_key\n    # Or for Azure OpenAI:\n    # export AZURE_OPENAI_API_KEY=your_key\n    # export AZURE_OPENAI_ENDPOINT=https:\u002F\u002Fxxx.openai.azure.com\n    ```\n\n脚本中的使用示例\n\n    ```python\n    >>> from underthesea import agent\n\n    >>> agent(\"Xin chào!\")\n    'Xin chào! Tôi có thể giúp gì cho bạn?'\n\n    >>> agent(\"NLP là gì?\")\n    'NLP (Natural Language Processing) là xử lý ngôn ngữ tự nhiên...'\n\n    >>> agent(\"Cho ví dụ về word tokenization tiếng Việt\")\n    'Word tokenization trong tiếng Việt là quá trình...'\n\n    # Reset conversation\n    >>> agent.reset()\n    ```\n\n支持 Azure OpenAI\n\n    ```python\n    >>> agent(\"Hello\", provider=\"azure\", model=\"my-gpt4-deployment\")\n    ```\n\n带自定义工具的 Agent（函数调用）\n\n    ```python\n    >>> from underthesea.agent import Agent, Tool\n\n    # Define tools as functions\n    >>> def get_weather(location: str) -> dict:\n    ...     \"\"\"Get current weather for a location.\"\"\"\n    ...     return {\"location\": location, \"temp\": 25, \"condition\": \"sunny\"}\n\n    >>> def search_news(query: str) -> str:\n    ...     \"\"\"Search Vietnamese news.\"\"\"\n    ...     return f\"Results for: {query}\"\n\n    # Create agent with tools\n    >>> my_agent = Agent(\n    ...     name=\"assistant\",\n    ...     tools=[\n    ...         Tool(get_weather, description=\"Get weather for a city\"),\n    ...         Tool(search_news, description=\"Search Vietnamese news\"),\n    ...     ],\n    ...     instruction=\"You are a helpful Vietnamese assistant.\"\n    ... )\n\n    # Agent automatically calls tools when needed\n    >>> my_agent(\"Thời tiết ở Hà Nội thế nào?\")\n    'Thời tiết ở Hà Nội hiện tại là 25°C và nắng.'\n\n    >>> my_agent.reset()  # Clear conversation history\n    ```\n\n使用默认工具（如 LangChain\u002FOpenAI 工具）\n\n    ```python\n    >>> from underthesea.agent import Agent, default_tools\n\n    # Create agent with built-in tools:\n    # calculator, datetime, web_search, wikipedia, shell, python, file ops...\n    >>> my_agent = Agent(\n    ...     name=\"assistant\",\n    ...     tools=default_tools,\n    ... )\n\n    >>> my_agent(\"What time is it?\")           # Uses datetime tool\n    >>> my_agent(\"Calculate sqrt(144) + 10\")   # Uses calculator tool\n    >>> my_agent(\"Search for Python tutorials\") # Uses web_search tool\n    ```\n\u003C\u002Fdetails>\n\n### 资源\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>\u003Ca href=\"\">越南语自然语言处理 (NLP) 资源\u003C\u002Fa>\u003C\u002Fb>\u003C\u002Fsummary>\n\n\u003Cbr\u002F>\n\n列出资源\n\n```bash\n$ underthesea list-data\n| Name                      | Type        | License | Year | Directory                          |\n|---------------------------+-------------+---------+------+------------------------------------|\n| CP_Vietnamese_VLC_v2_2022 | Plaintext   | Open    | 2023 | datasets\u002FCP_Vietnamese_VLC_v2_2022 |\n| UIT_ABSA_RESTAURANT       | Sentiment   | Open    | 2021 | datasets\u002FUIT_ABSA_RESTAURANT       |\n| UIT_ABSA_HOTEL            | Sentiment   | Open    | 2021 | datasets\u002FUIT_ABSA_HOTEL            |\n| SE_Vietnamese-UBS         | Sentiment   | Open    | 2020 | datasets\u002FSE_Vietnamese-UBS         |\n| CP_Vietnamese-UNC         | Plaintext   | Open    | 2020 | datasets\u002FCP_Vietnamese-UNC         |\n| DI_Vietnamese-UVD         | Dictionary  | Open    | 2020 | datasets\u002FDI_Vietnamese-UVD         |\n| UTS2017-BANK              | Categorized | Open    | 2017 | datasets\u002FUTS2017-BANK              |\n| VNTQ_SMALL                | Plaintext   | Open    | 2012 | datasets\u002FLTA                       |\n| VNTQ_BIG                  | Plaintext   | Open    | 2012 | datasets\u002FLTA                       |\n| VNESES                    | Plaintext   | Open    | 2012 | datasets\u002FLTA                       |\n| VNTC                      | Categorized | Open    | 2007 | datasets\u002FVNTC                      |\n\n$ underthesea list-data --all\n```\n\n下载资源\n\n```bash\n$ underthesea download-data CP_Vietnamese_VLC_v2_2022\nResource CP_Vietnamese_VLC_v2_2022 is downloaded in ~\u002F.underthesea\u002Fdatasets\u002FCP_Vietnamese_VLC_v2_2022 folder\n```\n\n\u003C\u002Fdetails>\n\n### 即将推出的功能\n\n* 自动语音识别 (ASR)\n\n## 贡献\n\n想要参与 underthesea 的开发吗？太好了！请阅读更多详情：[贡献指南](https:\u002F\u002Fundertheseanlp.github.io\u002Funderthesea\u002Fdocs\u002Fdeveloper\u002Fcontributing)\n\n## 💝 支持我们\n\n如果您发现这个项目有帮助并希望支持我们的工作，可以请我们喝杯咖啡 ☕。\n\n您的支持是我们最大的鼓励 🎁！\n\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fundertheseanlp_underthesea_readme_b58fa2b6edf1.png\"\u002F>","# Underthesea 快速上手指南\n\n**Underthesea** 是一个开源的越南语自然语言处理（NLP）工具包，提供了一系列易于使用的 Python 模块、数据集和教程，支持越南语的文本分析任务，如分词、词性标注、命名实体识别、情感分析等。\n\n## 1. 环境准备\n\n*   **操作系统**: Windows, macOS, Linux\n*   **Python 版本**: 3.10 及以上 (推荐 3.10 - 3.14)\n*   **依赖管理**: 建议使用 `pip` 进行包管理\n\n## 2. 安装步骤\n\n### 基础安装\n安装核心功能模块：\n\n```bash\n$ pip install underthesea\n✨🍰✨\n```\n\n### 扩展功能安装\n根据需求安装额外功能（注意：在 zsh 中请使用引号包裹）：\n\n```bash\n# 深度学习支持 (用于深度模型 NER、依存句法分析等)\n$ pip install \"underthesea[deep]\"\n\n# 语音合成支持 (Text-to-Speech)\n$ pip install \"underthesea[voice]\"\n\n# 对话 AI 代理支持 (Conversational AI Agent)\n$ pip install \"underthesea[agent]\"\n```\n\n## 3. 基本使用\n\n以下示例展示了最核心的越南语 NLP 功能，安装基础版即可运行。\n\n### 文本分词 (Word Segmentation)\n将越南语文本切分为单词或短语：\n\n```python\n>>> from underthesea import word_tokenize\n>>> word_tokenize(\"Chàng trai 9X Quảng Trị khởi nghiệp từ nấm sò\")\n[\"Chàng trai\", \"9X\", \"Quảng Trị\", \"khởi nghiệp\", \"từ\", \"nấm\", \"sò\"]\n\n>>> word_tokenize(\"Chàng trai 9X Quảng Trị khởi nghiệp từ nấm sò\", format=\"text\")\n\"Chàng_trai 9X Quảng_Trị khởi_nghiệp từ nấm sò\"\n```\n\n### 文本归一化 (Text Normalization)\n标准化文本表示，例如修正拼写错误：\n\n```python\n>>> from underthesea import text_normalize\n>>> text_normalize(\"Ðảm baỏ chất lựơng phòng thí nghịêm hoá học\")\n\"Đảm bảo chất lượng phòng thí nghiệm hóa học\"\n```\n\n### 情感分析 (Sentiment Analysis)\n判断文本的情感倾向（正面\u002F负面）：\n\n```python\n>>> from underthesea import sentiment\n\n>>> sentiment('hàng kém chất lg,chăn đắp lên dính lông lá khắp người. thất vọng')\n'negative'\n>>> sentiment('Sản phẩm hơi nhỏ so với tưởng tượng nhưng chất lượng tốt, đóng gói cẩn thận.')\n'positive'\n```\n\n### 命名实体识别 (Named Entity Recognition)\n识别文本中的特定实体（如人名、地名）：\n\n```python\n>>> from underthesea import ner\n>>> text = 'Chưa tiết lộ lịch trình tới Việt Nam của Tổng thống Mỹ Donald Trump'\n>>> ner(text)\n[('Chưa', 'R', 'O', 'O'),\n ('tiết lộ', 'V', 'B-VP', 'O'),\n ('lịch trình', 'V', 'B-VP', 'O'),\n ('tới', 'E', 'B-PP', 'O'),\n ('Việt Nam', 'Np', 'B-NP', 'B-LOC'),\n ('của', 'E', 'B-PP', 'O'),\n ('Tổng thống', 'N', 'B-NP', 'O'),\n ('Mỹ', 'Np', 'B-NP', 'B-LOC'),\n ('Donald', 'Np', 'B-NP', 'B-PER'),\n ('Trump', 'Np', 'B-NP', 'I-PER')]\n```","某跨境电商运营团队正在搭建越南市场客户反馈系统，需要自动化处理海量越南语用户评论以提取产品痛点。\n\n### 没有 underthesea 时\n- 越南语书写无空格分隔，人工编写正则分词规则极其耗时且极易出现边界错误\n- 通用英文 NLP 模型无法准确理解越南语特有词汇和复杂语法结构，识别率低\n- 用户输入的地址格式混乱，包含缩写或不规范写法，导致物流配送信息解析失败\n- 缺乏本地化支持，需要花费数周时间收集语料并从头训练基础模型，成本高昂\n\n### 使用 underthesea 后\n- 直接调用 API 即可实现精准的越南语句子分割与词性标注，无需额外配置环境\n- 内置预训练模型能准确识别越南语人名、地名等关键实体，大幅提升信息抽取质量\n- 自动将非标准地址转换为规范格式，有效解决数据清洗中的脏数据问题\n- 开箱即用，大幅缩短从数据接入到业务落地的开发周期，让团队专注核心业务逻辑\n\nunderthesea 通过提供成熟的越南语 NLP 能力，显著降低了跨境业务的数据处理门槛与技术成本。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fundertheseanlp_underthesea_15ec3b03.png","undertheseanlp","Under The Sea","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fundertheseanlp_4a554e62.png","Vietnamese NLP Research Group",null,"undertheseanlp@gmail.com","undertheseanlp.com","https:\u002F\u002Fgithub.com\u002Fundertheseanlp",[23,27,31,35,39,43,47,51,55,59],{"name":24,"color":25,"percentage":26},"Python","#3572A5",39.2,{"name":28,"color":29,"percentage":30},"JavaScript","#f1e05a",19.4,{"name":32,"color":33,"percentage":34},"TypeScript","#3178c6",19.2,{"name":36,"color":37,"percentage":38},"Rust","#dea584",14,{"name":40,"color":41,"percentage":42},"CSS","#663399",6.7,{"name":44,"color":45,"percentage":46},"HTML","#e34c26",0.8,{"name":48,"color":49,"percentage":50},"Jupyter Notebook","#DA5B0B",0.4,{"name":52,"color":53,"percentage":54},"Dockerfile","#384d54",0.2,{"name":56,"color":57,"percentage":58},"TeX","#3D6117",0.1,{"name":60,"color":61,"percentage":62},"Shell","#89e051",0,1706,290,"2026-04-05T15:53:20","Apache-2.0",1,"未说明",{"notes":70,"python":71,"dependencies":72},"1. 基础安装只需 pip install underthesea，可选扩展包括 [deep]（深度学习）、[voice]（语音合成）、[agent]（对话智能体）、[prompt]（提示词分类）。\n2. 语音功能需手动下载模型文件（如 underthesea download-model VIET_TTS_V0_4_1）。\n3. 智能体和提示词功能需配置环境变量 OPENAI_API_KEY 或 AZURE_OPENAI_API_KEY。\n4. 在 zsh 环境下安装扩展依赖时需注意给包名加引号。","3.10+",[6],[74,75,76,77,78,79],"开发框架","图像","视频","Agent","音频","语言模型",[81,82,83,84,85,86,87,88,89,90,91,92,93,94,95],"nlp","nlp-library","vietnamese-nlp","vietnamese","natural-language-processing","vietnamese-tokenizer","word-segmenter","sentence-segmentation","named-entity-recognition","ner","dependency-parsing","pos-tagging","dependency-parser","agents","llm",4,"ready","2026-03-27T02:49:30.150509","2026-04-06T08:42:04.714072",[101,106,111,116,121,125],{"id":102,"question_zh":103,"answer_zh":104,"source_url":105},3079,"Underthesea 运行速度太慢怎么办？","维护团队已意识到性能问题并进行了优化。目前的解决方案是使用 Rust 重写部分预处理特征（Feature）和 CRF 模型类（TaggedTransformer）。建议升级到最新稳定版本（如 v1.3.4 或更高），以获得显著的速度提升。相关优化代码可参考：https:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea\u002Ftree\u002FGH-185\u002Fextensions\u002Funderthesea_core","https:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea\u002Fissues\u002F185",{"id":107,"question_zh":108,"answer_zh":109,"source_url":110},3080,"Underthesea 支持在 Windows 系统上安装和运行吗？","目前 Underthesea 官方不直接支持 Windows 系统。如果遇到安装或使用问题，建议在 Ubuntu 或 CentOS 环境下使用。如果在 Windows 上必须使用，请通过虚拟机（VM）或 Docker 容器运行 Linux 环境来规避兼容性问题。","https:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea\u002Fissues\u002F343",{"id":112,"question_zh":113,"answer_zh":114,"source_url":115},3081,"安装 underthesea v1.1.6rc2 版本时报错无法安装怎么办？","v1.1.6rc2 版本存在已知的安装缺陷。该问题已在后续发布的 v1.1.7 版本中修复。建议避免使用 rc 测试版，直接安装最新的稳定版本，或回退到之前可用的稳定版本。","https:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea\u002Fissues\u002F174",{"id":117,"question_zh":118,"answer_zh":119,"source_url":120},3082,"在 macOS 10.11 上导入 underthesea 6.2.0 出现 ImportError 如何解决？","旧版 macOS 可能不兼容新版预编译包。最简单的解决方法是将 underthesea 降级到 6.1.1 版本，该版本在 macOS 10.11 上已被验证可以正常工作。","https:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea\u002Fissues\u002F677",{"id":122,"question_zh":123,"answer_zh":124,"source_url":120},3083,"如何在 macOS 上通过源码构建解决 underthesea 导入错误？","如果无法使用预编译包，可以从 PyPI 下载 underthesea-core 1.0.4 的源码。安装 maturin 工具后，在本地执行 `maturin build` 命令编译 wheel 包，然后手动安装编译好的 wheel，最后通过 `pip3 install --upgrade underthesea` 升级主库即可解决导入问题。",{"id":126,"question_zh":127,"answer_zh":128,"source_url":129},3084,"安装 underthesea 时提示 \"ModuleNotFoundError: No module named 'maturin'\" 错误如何处理？","这是一个已知问题，已被标记为 Issue #770 的重复项。通常是由于 pip 解析依赖时的环境问题导致。建议检查 pip 版本是否过旧，或参考 Issue #770 中的具体解决方案进行处理。","https:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea\u002Fissues\u002F728",[131,136,141,146,151,156,161,166,171,176,181,186,191,196,201,206,211,215,220,225],{"id":132,"version":133,"summary_zh":134,"released_at":135},112275,"underthesea-v9.2.11","## Changes\n\n- **Remove `fasttext` dependency** — language detection now uses pure Rust inference via `underthesea_core` (#953, closes #941)\n- Switch lang detect model from `lid.176.bin` (126MB) to `lid.176.ftz` (917KB)\n- Bump `underthesea_core` requirement to `>=3.3.0`\n- `lang_detect()` now works out of the box — no need for `pip install underthesea[langdetect]`\n\n## Performance\n\n| | Before (C++ fasttext) | After (Rust underthesea_core) |\n|-|----------------------|-------------------------------|\n| Throughput | 45,547 pred\u002Fs | **110,001 pred\u002Fs** (2.4x faster) |\n| Model size | 126 MB | **917 KB** (137x smaller) |\n| Install | Requires C++ compiler | Pre-built wheels |","2026-02-07T03:23:53",{"id":137,"version":138,"summary_zh":139,"released_at":140},112276,"underthesea-core-v3.3.0","## Features\n\n- Add pure Rust **FastText inference** module for supervised text classification\n- Supports both `.bin` (dense) and `.ftz` (quantized\u002FProduct Quantization) model formats\n- Exposed to Python via PyO3 as `FastText` class\n\n## Validation\n\n- **100% prediction match** vs C++ fasttext on 97 test cases across 25+ languages\n- **95.9% accuracy** on language detection benchmark (identical to C++ fasttext)\n- **2.3x faster inference** (122k vs 53k predictions\u002Fsec)\n\n## Usage\n\n```python\nfrom underthesea_core import FastText\n\nmodel = FastText.load(\"lid.176.ftz\")\nresults = model.predict(\"Xin chào Việt Nam\", k=3)\n# [(\"vi\", 0.985), (\"war\", 0.005), ...]\n\nlabels = model.get_labels()  # [\"af\", \"am\", ..., \"vi\", ..., \"zu\"]\nhidden = model.get_hidden(\"text\")  # embedding vector\n```\n\n## API\n\n| Method | Description |\n|--------|-------------|\n| `FastText.load(path)` | Load `.bin` or `.ftz` model |\n| `model.predict(text, k)` | Top-k predictions `[(label, score), ...]` |\n| `model.get_labels()` | All label strings |\n| `model.get_hidden(text)` | Hidden vector (averaged embeddings) |\n| `model.get_features(text)` | Input feature IDs |\n| `model.dim` | Model dimensionality |\n| `model.nwords` | Number of words |\n| `model.nlabels` | Number of labels |","2026-02-07T02:16:56",{"id":142,"version":143,"summary_zh":144,"released_at":145},112277,"v9.2.9","## Changes\n\n- Update `underthesea_core` dependency to 3.1.7\n\n## New Features (from underthesea_core 3.1.7)\n\n- `TextClassifier` - End-to-end TF-IDF + SVM text classification\n- `LinearSVC` - Linear SVM classifier\n- `Label` and `Sentence` classes for API compatibility\n- Parallel training and inference with rayon\n- Binary model serialization with bincode\n\n## Performance\n\n- **16x faster** training vs sklearn\n- **27x faster** inference vs sklearn\n\n## Usage\n\n```python\nfrom underthesea_core import TextClassifier\n\nclf = TextClassifier(max_features=20000, ngram_range=(1, 2))\nclf.fit(texts, labels)\nlabel = clf.predict(\"Vietnamese text\")\n```\n","2026-02-03T01:25:01",{"id":147,"version":148,"summary_zh":149,"released_at":150},112278,"underthesea_core-v3.1.7","## Features\n\n- Add `LinearSVC` for text classification (LIBLINEAR-style Dual Coordinate Descent)\n- Add `TextClassifier` for end-to-end TF-IDF + SVM classification\n- Add `Label` and `Sentence` classes for underthesea API compatibility\n- Add parallel processing for TF-IDF fit and SVM training (rayon)\n- Add binary serialization with bincode\n\n## Performance (VNTC dataset, 84k documents)\n\n| Metric | sklearn | Rust | Speedup |\n|--------|---------|------|---------|\n| Training | 143s | 8.8s | **16x** |\n| Inference | 1,031\u002Fsec | 27,401\u002Fsec | **27x** |\n| Accuracy | 92.50% | 92.25% | - |\n\n## Usage\n\n```python\nfrom underthesea_core import TextClassifier, Label, Sentence\n\n# Train\nclf = TextClassifier(max_features=20000, ngram_range=(1, 2))\nclf.fit(texts, labels)\n\n# Predict\nlabel = clf.predict(\"text\")\nlabel, score = clf.predict_with_score(\"text\")\n\n# With Sentence object\nsentence = Sentence(\"text\")\nclf.predict_sentence(sentence)\nprint(sentence.labels[0].value)\n\n# Save\u002FLoad\nclf.save(\"model.bin\")\nclf = TextClassifier.load(\"model.bin\")\n```\n","2026-02-03T01:20:32",{"id":152,"version":153,"summary_zh":154,"released_at":155},112279,"sen-1-v1.0.0","Vietnamese Text Classification Models\n\n## Models\n- **sen-general-1.0.0-20260203.bin** - General news classification (10 topics, 92.25% accuracy)\n- **sen-bank-1.0.0-20260203.bin** - Banking domain classification (14 categories, 73.68% accuracy)\n\n## Usage\n```python\nfrom underthesea_core import TextClassifier\n\n# Download and load\nclf = TextClassifier.load('path\u002Fto\u002Fmodel.bin')\nlabel = clf.predict('Văn bản tiếng Việt')\n```\n","2026-02-03T02:41:20",{"id":157,"version":158,"summary_zh":159,"released_at":160},112280,"v9.2.5","## Changes\n\n- Remove `python-crfsuite` dependency (#915)\n\nAll CRF functionality now uses `underthesea-core`. This completes the migration started in #907.\n\n## Summary of #907\n\n| Version | Changes |\n|---------|---------|\n| v9.2.2 | word_tokenize uses underthesea-core |\n| v9.2.3 | pos_tag, ner, chunking use underthesea-core |\n| v9.2.4 | crf_trainer uses underthesea-core, removed unused CRF taggers |\n| v9.2.5 | Removed python-crfsuite dependency |","2026-02-02T03:44:23",{"id":162,"version":163,"summary_zh":164,"released_at":165},112281,"v9.2.4","## Changes\n\n- refactor: update crf_trainer to use underthesea-core (#914)\n- Remove unused crf_sequence_tagger.py and py_crf_sequence_tagger.py\n\nCompletes #907 - replacing python-crfsuite with underthesea-core.","2026-02-02T03:39:05",{"id":167,"version":168,"summary_zh":169,"released_at":170},112282,"v9.2.3","## Changes\n\n- refactor(pos_tag): replace python-crfsuite with underthesea-core (#912)\n- refactor(ner,chunking): replace python-crfsuite with underthesea-core (#913)\n\nPart of #907 - replacing python-crfsuite with underthesea-core.","2026-02-02T03:17:09",{"id":172,"version":173,"summary_zh":174,"released_at":175},112283,"v9.2.2","## Changes\n\n- refactor(word_tokenize): replace python-crfsuite with underthesea-core (#909)\n  - Replace `pycrfsuite.Tagger` with `underthesea_core.CRFTagger` in `FastCRFSequenceTagger`\n  - First step towards removing python-crfsuite dependency (#907)","2026-02-02T03:07:37",{"id":177,"version":178,"summary_zh":179,"released_at":180},112284,"v9.2.0","## What's New\r\n\r\n### Added\r\n\r\n- Add Agent class with custom tools support using OpenAI function calling ([GH-712](https:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea\u002Fissues\u002F712))\r\n- Add default tools: calculator, datetime, web_search, wikipedia, shell, python, file operations ([GH-712](https:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea\u002Fissues\u002F712))\r\n\r\n### Changed\r\n\r\n- Upgrade underthesea_core to 2.0.0 with L-BFGS optimizer ([#899](https:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea\u002Fpull\u002F899))\r\n  - 10x faster feature lookup with flat data structure\r\n  - 1.24x faster than python-crfsuite for word segmentation\r\n  - L-BFGS with OWL-QN for L1 regularization\r\n\r\n## Installation\r\n\r\n```bash\r\npip install underthesea==9.2.0\r\n```\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea\u002Fcompare\u002Fv9.1.5...v9.2.0","2026-01-31T17:33:29",{"id":182,"version":183,"summary_zh":184,"released_at":185},112285,"v9.1.5","## What's New\n\n### Added\n\n- **Agent API** - Conversational AI agent with OpenAI and Azure OpenAI support ([GH-745](https:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea\u002Fissues\u002F745), [#890](https:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea\u002Fpull\u002F890))\n  ```python\n  from underthesea import agent\n  \n  response = agent(\"Xin chào, NLP là gì?\")\n  agent.reset()\n  ```\n- **ParserTrainer** - Training pipeline for dependency parsing ([GH-392](https:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea\u002Fissues\u002F392), [#880](https:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea\u002Fpull\u002F880))\n- **POS Tagger Training** - Training pipeline for POS tagging ([GH-423](https:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea\u002Fissues\u002F423), [#883](https:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea\u002Fpull\u002F883))\n\n### Documentation\n\n- Add Vietnamese News Dataset (UVN) documentation ([#888](https:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea\u002Fpull\u002F888), [#889](https:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea\u002Fpull\u002F889))\n- Add UVB dataset documentation ([#887](https:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea\u002Fpull\u002F887))\n- Add UUD-v0.1 dataset documentation ([#886](https:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea\u002Fpull\u002F886))\n- Add UTS Dictionary dataset documentation ([#884](https:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea\u002Fpull\u002F884))\n\n## Installation\n\n```bash\npip install underthesea==9.1.5\n\n# With agent support\npip install \"underthesea[agent]==9.1.5\"\n```\n\n## Agent Environment Variables\n\n| Provider | Variables |\n|----------|-----------|\n| OpenAI | `OPENAI_API_KEY`, `OPENAI_MODEL` |\n| Azure | `AZURE_OPENAI_API_KEY`, `AZURE_OPENAI_ENDPOINT`, `AZURE_OPENAI_DEPLOYMENT` |\n\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea\u002Fcompare\u002Fv9.1.4...v9.1.5","2026-01-29T01:40:24",{"id":187,"version":188,"summary_zh":189,"released_at":190},112286,"v9.1.4","## [9.1.4] - 2026-01-24\n\n### Added\n\n- Implement Logistic Regression library in Rust ([#878](https:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea\u002Fpull\u002F878))\n- Implement CRF library in Rust ([#876](https:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea\u002Fpull\u002F876))\n\n### Changed\n\n- Remove NLTK dependency ([#879](https:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea\u002Fpull\u002F879))\n\n### Security\n\n- Fix Dependabot security vulnerabilities ([#874](https:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea\u002Fpull\u002F874), [#875](https:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea\u002Fpull\u002F875))\n\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea\u002Fcompare\u002Fv9.1.3...v9.1.4","2026-01-24T16:05:38",{"id":192,"version":193,"summary_zh":194,"released_at":195},112287,"v9.1.3","## What's Changed\n\n### New Features\n- Add dependency tree visualization ([#867](https:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea\u002Fpull\u002F867))\n\n### Bug Fixes\n- Fix underthesea[voice] installation ([#868](https:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea\u002Fpull\u002F868))\n- Fix TTS UnicodeDecodeError on Windows by specifying UTF-8 encoding ([#869](https:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea\u002Fpull\u002F869))\n- Fix KeyError: '__getitems__' in Sentence.__getattr__ ([#870](https:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea\u002Fpull\u002F870))\n- Fix ValueError when loading DependencyParser from non-existent path ([#873](https:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea\u002Fpull\u002F873))\n\n### Improvements\n- Support PyTorch v2 for dependency parsing ([#871](https:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea\u002Fpull\u002F871))\n\n### Documentation\n- Update CP_Vietnamese-VLC README with HuggingFace dataset ([#872](https:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea\u002Fpull\u002F872))\n\n### Full Changelog\nhttps:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea\u002Fcompare\u002Fv9.1.2...v9.1.3","2026-01-24T10:24:20",{"id":197,"version":198,"summary_zh":199,"released_at":200},112288,"v9.1.2","## What's Changed\n\n### New Features\n- Add `labels` property to `classify` and `sentiment` functions ([#865](https:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea\u002Fpull\u002F865))\n  - `classify.labels` - Get all available classification labels\n  - `classify.bank.labels` - Get bank domain classification labels\n  - `sentiment.labels` - Get all available sentiment labels\n  - `sentiment.bank.labels` - Get bank domain sentiment labels\n\n### Usage\n\n```python\nfrom underthesea import classify, sentiment\n\n# Get classification labels\nclassify.labels\n# ['chinh_tri_xa_hoi', 'doi_song', 'khoa_hoc', 'kinh_doanh', 'phap_luat', 'suc_khoe', 'the_gioi', 'the_thao', 'van_hoa', 'vi_tinh']\n\nclassify.bank.labels\n# ['ACCOUNT', 'CARD', 'CUSTOMER_SUPPORT', 'DISCOUNT', 'INTEREST_RATE', 'INTERNET_BANKING', 'LOAN', 'MONEY_TRANSFER', 'OTHER', 'PAYMENT', 'PROMOTION', 'SAVING', 'SECURITY', 'TRADEMARK']\n\n# Get sentiment labels\nsentiment.labels\n# ['positive', 'negative']\n\nsentiment.bank.labels\n# ['ACCOUNT#negative', 'CARD#negative', 'CARD#neutral', 'CARD#positive', ...]\n```\n\n### Full Changelog\nhttps:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea\u002Fcompare\u002Fv9.1.1...v9.1.2","2026-01-24T04:31:45",{"id":202,"version":203,"summary_zh":204,"released_at":205},112289,"v9.1.1","## What's Changed\n\n### Bug Fixes\n- Fix VERSION file to match pyproject.toml - `__version__` now correctly reports `9.1.1`\n\n### Full Changelog\nhttps:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea\u002Fcompare\u002Fv9.1.0...v9.1.1","2026-01-24T02:01:24",{"id":207,"version":208,"summary_zh":209,"released_at":210},112290,"v9.0.0","## What's Changed\n\n* Add Vietnamese-English translation module in #856\n\n## New Features\n\n* **translate()**: New function for Vietnamese to English translation using transformer models\n  ```python\n  from underthesea import translate\n  print(translate(\"Xin chào Việt Nam\"))\n  # Output: Hello Vietnam\n  ```\n\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea\u002Fcompare\u002Fv8.3.0...v9.0.0","2026-01-24T00:32:01",{"id":212,"version":213,"summary_zh":18,"released_at":214},112291,"report","2025-10-10T00:18:20",{"id":216,"version":217,"summary_zh":218,"released_at":219},112292,"v8.3.0","## What's Changed\r\n* GH-731: Sonar Core 1 - Add bank model by @rain1024 in https:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea\u002Fpull\u002F824\r\n* GH-731: Sonar Core 1 - update inference by @rain1024 in https:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea\u002Fpull\u002F826\r\n* GH-731: Sonar Core 1 - Refactor bank classification module and update model by @rain1024 in https:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea\u002Fpull\u002F828\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea\u002Fcompare\u002Fv8.2.0...v8.3.0","2025-09-28T00:37:47",{"id":221,"version":222,"summary_zh":223,"released_at":224},112293,"v8.2.0","## What's Changed\r\n\r\n* GH-731: Update project structure, create extensions\u002Flab folder by @rain1024 in https:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea\u002Fpull\u002F812\r\n* GH-731: Create Sonar Core 1 - System Card by @rain1024 in https:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea\u002Fpull\u002F813\r\n* GH-731: Update output format of model sonar_core_1 by @rain1024 in https:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea\u002Fpull\u002F815\r\n* GH-771: Release version 8.2.0 by @rain1024 in https:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea\u002Fpull\u002F817\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea\u002Fcompare\u002Fv8.1.0...v8.2.0","2025-09-27T21:25:27",{"id":226,"version":227,"summary_zh":228,"released_at":229},112294,"v8.1.0","## What's Changed\r\n\r\n* GH-770: Fix missing .pkl files by @rain1024 in https:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea\u002Fpull\u002F809\r\n\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fundertheseanlp\u002Funderthesea\u002Fcompare\u002Fv8.0.1...v8.1.0","2025-09-21T01:50:29",[231,240,249,257,265,276],{"id":232,"name":233,"github_repo":234,"description_zh":235,"stars":236,"difficulty_score":237,"last_commit_at":238,"category_tags":239,"status":97},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,3,"2026-04-05T11:01:52",[74,75,77],{"id":241,"name":242,"github_repo":243,"description_zh":244,"stars":245,"difficulty_score":246,"last_commit_at":247,"category_tags":248,"status":97},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",140436,2,"2026-04-05T23:32:43",[74,77,79],{"id":250,"name":251,"github_repo":252,"description_zh":253,"stars":254,"difficulty_score":246,"last_commit_at":255,"category_tags":256,"status":97},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107662,"2026-04-03T11:11:01",[74,75,77],{"id":258,"name":259,"github_repo":260,"description_zh":261,"stars":262,"difficulty_score":246,"last_commit_at":263,"category_tags":264,"status":97},3704,"NextChat","ChatGPTNextWeb\u002FNextChat","NextChat 是一款轻量且极速的 AI 助手，旨在为用户提供流畅、跨平台的大模型交互体验。它完美解决了用户在多设备间切换时难以保持对话连续性，以及面对众多 AI 模型不知如何统一管理的痛点。无论是日常办公、学习辅助还是创意激发，NextChat 都能让用户随时随地通过网页、iOS、Android、Windows、MacOS 或 Linux 端无缝接入智能服务。\n\n这款工具非常适合普通用户、学生、职场人士以及需要私有化部署的企业团队使用。对于开发者而言，它也提供了便捷的自托管方案，支持一键部署到 Vercel 或 Zeabur 等平台。\n\nNextChat 的核心亮点在于其广泛的模型兼容性，原生支持 Claude、DeepSeek、GPT-4 及 Gemini Pro 等主流大模型，让用户在一个界面即可自由切换不同 AI 能力。此外，它还率先支持 MCP（Model Context Protocol）协议，增强了上下文处理能力。针对企业用户，NextChat 提供专业版解决方案，具备品牌定制、细粒度权限控制、内部知识库整合及安全审计等功能，满足公司对数据隐私和个性化管理的高标准要求。",87618,"2026-04-05T07:20:52",[74,79],{"id":266,"name":267,"github_repo":268,"description_zh":269,"stars":270,"difficulty_score":246,"last_commit_at":271,"category_tags":272,"status":97},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",84991,"2026-04-05T10:45:23",[75,273,76,274,77,275,79,74,78],"数据工具","插件","其他",{"id":277,"name":278,"github_repo":279,"description_zh":280,"stars":281,"difficulty_score":237,"last_commit_at":282,"category_tags":283,"status":97},3128,"ragflow","infiniflow\u002Fragflow","RAGFlow 是一款领先的开源检索增强生成（RAG）引擎，旨在为大语言模型构建更精准、可靠的上下文层。它巧妙地将前沿的 RAG 技术与智能体（Agent）能力相结合，不仅支持从各类文档中高效提取知识，还能让模型基于这些知识进行逻辑推理和任务执行。\n\n在大模型应用中，幻觉问题和知识滞后是常见痛点。RAGFlow 通过深度解析复杂文档结构（如表格、图表及混合排版），显著提升了信息检索的准确度，从而有效减少模型“胡编乱造”的现象，确保回答既有据可依又具备时效性。其内置的智能体机制更进一步，使系统不仅能回答问题，还能自主规划步骤解决复杂问题。\n\n这款工具特别适合开发者、企业技术团队以及 AI 研究人员使用。无论是希望快速搭建私有知识库问答系统，还是致力于探索大模型在垂直领域落地的创新者，都能从中受益。RAGFlow 提供了可视化的工作流编排界面和灵活的 API 接口，既降低了非算法背景用户的上手门槛，也满足了专业开发者对系统深度定制的需求。作为基于 Apache 2.0 协议开源的项目，它正成为连接通用大模型与行业专有知识之间的重要桥梁。",77062,"2026-04-04T04:44:48",[77,75,74,79,275]]