Giter Site home page Giter Site logo

mhagiwara's People

Contributors

mhagiwara avatar

Watchers

 avatar

mhagiwara's Issues

tinysegmenter.py

        self._patterns = {
            u"[一二三四五六七八九十百千万億兆]":u"M",
            u"[一-龠々〆ヵヶ]":u"H",
            u"[ぁ-ん]":u"I",
            u"[ァ-ヴーア-ン゙ー]":u"K",
            u"[a-zA-Za-zA-Z]":u"A",
            u"[0-90-9]":u"N"
            }
        self._chartype = []
        for pat in self._patterns:
            regexp = re.compile(pat)
            self._chartype.append([regexp, self._patterns[pat]])

is wrong. The "for in" statement does not preserve written order of the 
dictionary self._patterns.  Since the patterns in self._patterns overlap each 
other, the matching order is significant. In Python 2.7.2, 
u"[一-龠々〆ヵヶ]" precedes 
u"[一二三四五六七八九十百千万億兆]" in the resulted 
self._chartype.

Original issue reported on code.google.com by [email protected] on 10 Jun 2012 at 4:44

tinysegmenter.py

self._UW1 = {u",u":156,

is wrong. It should be:

self._UW1 = {u",":156,

Original issue reported on code.google.com by [email protected] on 10 Jun 2012 at 4:39

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.