Skip to main content

Word Sense Disambiguaion by Chinese Word Net

Chinese word sense disambiguation has been known to a very difficult problem since Chinese is a complicated language. A word can have dozens or even hundreds of meanings on different occasions. Manually labels the senses of the words is labor-intensive and inefficient.

In this project, we aim to solve this problem by state-of-the-art Bert model. It gives us huge performance gains and can score roughly 82% accuracy on Chinese word sense disambiguation problem.

Prerequest

  • Input should be tokenized first. POS Tagging is preferred but not required.
  • Suppose we have m sentences and each sentence has $n_m$ words.
    • list_of_sentence[ [list_of_word[[target, pos, sense_id, sense] * $n_m$ ] *m ]

    • The following is an example that has 2 sentences, input data should be formed as following

        [[["他","Nh","",""],["由","P","",""],["昏沈","VH","",""],["的","DE","",""],["睡夢","Na","",""],["中","Ng","",""],["醒來","VH","",""],[",","COMMACATEGORY","",""]],
         [["臉","Na","",""],["上","Ncd","",""],["濕涼","VH","",""],["的","DE","",""],["騷動","Nv","",""],["是","SHI","",""],["淚","Na","",""],["。","PERIODCATEGORY","",""]]]
      

How to get sense

  • At Project root directory (same as setup.py)

      pip3 install .
      import CWN_WSD
      data = read_somewhere() #list of sentence, and sentence is composed as list of word
      sense = CWN_WSD.wsd(data)
    
  • example can be found under example folder

Acknowledgement

We thank Po-Wen Chen (b05902117@ntu.edu.tw) and Yu-Yu Wu (b06902104@ntu.edu.tw) for contributions in model development.

Metadata

Release files for CwnSenseTagger 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for CwnSenseTagger 0.1.6
File Size Uploaded Provenance Actions
CwnSenseTagger-0.1.6.tar.gz 12.4 kB Without provenance Details for CwnSenseTagger-0.1.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for CwnSenseTagger 0.1.6
File Interpreter ABI Platform Actions
CwnSenseTagger-0.1.6-py3-none-any.whl Python 3 none any Details for CwnSenseTagger-0.1.6-py3-none-any.whl

Total release size: 41.0 kB

Release files / CwnSenseTagger-0.1.6.tar.gz

Download URL CwnSenseTagger-0.1.6.tar.gz
Size 12.4 kB
Tags Source
SHA-256 checksum
How to use checksums
f3a7a720ab81c452cf87294f84bd9e62357000127db39c32526da19fdeddafa0
BLAKE2b-256 checksum
How to use checksums
ebc625c631074892e0a89df17a9731fd9c40931021de59afaf76fdd69f2e6a04
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

Release files / CwnSenseTagger-0.1.6-py3-none-any.whl

Download URL CwnSenseTagger-0.1.6-py3-none-any.whl
Size 28.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
00727031fa61585d8b21465630b134b35be37138b6edbad7b7f43c76769a1ca0
BLAKE2b-256 checksum
How to use checksums
be16a62b5adce6ce01af9a4a34beebde09adc5cd220a95f0ca4f0e8e224f38e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

Security for CwnSenseTagger 0.1.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page