GithubHelp home page GithubHelp logo

bmxbmx3 / cn_sort Goto Github PK

View Code? Open in Web Editor NEW
319.0 3.0 9.0 17.08 MB

中文排序:按拼音/笔顺快速排序简体中文词组(百万数量级,可含中英/多音字)。如果对您有所帮助,欢迎点个star鼓励一下。

License: MIT License

Python 100.00%
njupt pinyin bihua pronounce stroke sort chinese word fast

cn_sort's People

Contributors

bmxbmx3 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cn_sort's Issues

小问题修一下

  1. setup.py install_requires 加入 openpyxl
>>> from cn_sort.process_cn_word import sort_word_list
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/ubuntu/.pyenv/versions/3.6.13/lib/python3.6/site-packages/cn_sort/__init__.py", line 2, in <module>
    from .process_cn_word import *
  File "/home/ubuntu/.pyenv/versions/3.6.13/lib/python3.6/site-packages/cn_sort/process_cn_word.py", line 8, in <module>
    import openpyxl
ModuleNotFoundError: No module named 'openpyxl'
  1. 文件路径兼容 Unix,\\ 改成 /

找不到文件导致的错误:

>>> from cn_sort.process_cn_word import sort_word_list
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/ubuntu/.pyenv/versions/3.6.13/lib/python3.6/site-packages/cn_sort/__init__.py", line 2, in <module>
    from .process_cn_word import *
  File "/home/ubuntu/.pyenv/versions/3.6.13/lib/python3.6/site-packages/cn_sort/process_cn_word.py", line 24, in <module>
    logging.config.fileConfig("".join([current_package_path, "\\res\\logging.conf"]))
  File "/home/ubuntu/.pyenv/versions/3.6.13/lib/python3.6/logging/config.py", line 76, in fileConfig
    formatters = _create_formatters(cp)
  File "/home/ubuntu/.pyenv/versions/3.6.13/lib/python3.6/logging/config.py", line 109, in _create_formatters
    flist = cp["formatters"]["keys"]
  File "/home/ubuntu/.pyenv/versions/3.6.13/lib/python3.6/configparser.py", line 959, in __getitem__
    raise KeyError(key)
KeyError: 'formatters'

logging.config.fileConfig("".join([current_package_path, "\\res\\logging.conf"]))

/home/ubuntu/.pyenv/versions/3.6.13/lib/python3.6/site-packages/cn_sort/process_cn_word.py:24:logging.config.fileConfig("".join([current_package_path, "\\res\\logging.conf"]))
/home/ubuntu/.pyenv/versions/3.6.13/lib/python3.6/site-packages/cn_sort/process_cn_word.py:47:    all_word_json_path = "".join([current_package_path, "\\res\\all_word.json"])
/home/ubuntu/.pyenv/versions/3.6.13/lib/python3.6/site-packages/cn_sort/process_cn_word.py:403:    logging_file_path = "".join([current_package_path, "\\res\\logging.conf"])  # 日志配置文件路径
/home/ubuntu/.pyenv/versions/3.6.13/lib/python3.6/site-packages/cn_sort/decorator.py:38:        logging.config.fileConfig("".join([current_package_path,"\\res\\logging.conf"]))

Python3.6-3.7 import 时报错

Python 3.6.10 (default, Dec 19 2019, 23:04:32)                                                                                                                                                                                                                 
[GCC 5.4.0 20160609] on linux                                                                                                                                                                                                                                  
Type "help", "copyright", "credits" or "license" for more information.                                                                                                                                                                                         
>>> from cn_sort.process_cn_word import sort_text_list                                                                                                                                                                                                         
Traceback (most recent call last):                                                                                                                                                                                                                             
  File "<stdin>", line 1, in <module>                                                                                                                                                                                                                          
  File "[ venv ]/lib/python3.6/site-packages/cn_sort/__init__.py", line 2, in <module>                                                                                                                                       
    from .process_cn_word import *                                                                                                                                                                                                                             
  File "[ venv ]/lib/python3.6/site-packages/cn_sort/process_cn_word.py", line 20, in <module>                                                                                                                               
    logging.config.fileConfig("".join([current_package_path, "\\res\\logging.conf"]))                                                                                                                                                                          
  File "/usr/lib/python3.6/logging/config.py", line 76, in fileConfig                                                                                                                                                                                          
    formatters = _create_formatters(cp)                                                                                                                                                                                                                        
  File "/usr/lib/python3.6/logging/config.py", line 109, in _create_formatters                                                                                                                                                                                 
    flist = cp["formatters"]["keys"]                                                                                                                                                                                                                           
  File "/usr/lib/python3.6/configparser.py", line 959, in __getitem__                                                                                                                                                                                          
    raise KeyError(key)                                                                                                                                                                                                                                        
KeyError: 'formatters' 

瘩字没进拼音库

如题。我是在做单个生字排序时发现这问题。疙瘩放一起没问题,单字瘩就排不了了。疙瘩两个字是现在2021新人教版六年级上的必会写字。

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.