Python calls ictclas3.0.dll through ctypes

Source: Internet
Author: User

Call and encapsulate the ICTCLAS part in the form of a module as much as possible. Do not encapsulate it as a function. Otherwise, access volation 0xx000 is easy to generate or

Bsuccess = DLL. ictclas_paragraphprocess (ctypes. c_char_p (s), 0)
Segmented = ctypes. c_char_p (bsuccess). Value segmented is of the none type. How can I solve this problem when I change to a module call? I don't know why.

In addition, ICTCLAS only supports text word segmentation in GBK encoding format. Other encoded texts such as UTF-8 should be converted to GBK first.


Open-source software is always incomplete, so when using open-source software, you must be optimistic about it.



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.