Giter Site home page Giter Site logo

能否给分词加个开关? about pinyin HOT 3 CLOSED

houbb avatar houbb commented on August 23, 2024
能否给分词加个开关?

from pinyin.

Comments (3)

houbb avatar houbb commented on August 23, 2024

拼音的拼接符号可以指定 拼音拼接指定连接符号,所以不需要手动 trim。你可以尝试下能否解决问题。

分词是为了多音字的准确性,实现是可以根据自己的需求指定的。

from pinyin.

zhfish avatar zhfish commented on August 23, 2024

我指的并不是连接符,那看来不是分词问题
我找一下测试案例,我记得当时是4个字, 然后输出了 a bcd这样的格式

from pinyin.

houbb avatar houbb commented on August 23, 2024

v0.2.0 添加了分词的自定义方法,你可以指定自定义的分词模式。PinyinSegments 有内置实现,也可以自定义。

PinyinBs pinyinBs = PinyinBs.newInstance().segment(PinyinSegments.chars());

chars 就是最简单的,可以理解为没有做分词。

from pinyin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.