Chinese Moral Foundation Dictionary 2.0
Project description
Chinese Moral Foundation Dictionary 2.0
Chinese Moral Foundation Dictionary 2.0 for Python. This project was inspired by https://github.com/civictechlab/cmfd
Introduction
The Chinese Moral Foundation Dictionary 2.0 (C-MFD 2.0) is a dictionary to assist the automated moral intuition detection and analysis in the Chinese language context. Starting from the existing Chinese translation of the English MFD, two experts selected additional Chinese moral concepts and used word2vec to fetch related words from an extensive Chinese dictionary. Four experts went through four-rounds of coding, followed by the validation from 202 crowd coders. The CMFD identifies not only the classic five moral foundations but also several potentially novel moral foundation candidates.
Team members
Devloped by Weiyu Zhang (National University of Singapore) and Yixiang Calvin Cheng (Oxford University), with assistance by Zhuo Chen (Shenzhen University), Yipeng Xi (Shanghai Jiaotong University), Haodong Liu (City University of Hong Kong) and Chuyao Wang (King's College London)
Example
text_test = """ 她一见他就倾心, 但他却偏要为非作歹。 结果两人败俱伤, 她心碎, 他惨遭报应。 他本来是一个英勇战斗的将军, 但因为一纸空文, 被诬陷入狱。 再加上尔虞我诈的诡计, 他最终丧失了自己的荣誉和尊严。 他曾认为自己是无所不能, 却不知道一念之间, 一切都会化为乌有。 如果他当初没有欺骗她, 如果他当初没有撕毁那张契约, 也许他们现在还在幸福的生活中。 现在, 他身陷囹圄, 只能思念那些曾经的日子。 他懊悔不已, 只能悔恨自己的软弱和自私。 他希望能有机会改正错误, 重新取回自己的荣誉, 但现实却是那么残酷。"""
import cmfd
result = cmfd.moral_quantity(text_test, duplicate=False, with_word=True)
print(result)
{'altr': {'num': 0.0, 'word': ''}, 'auth': {'num': 0.21428571428571427, 'word': '荣誉;将军;都会'}, 'care': {'num': 0.2857142857142857, 'word': '为非作歹;心碎;残酷;惨遭'}, 'dili': {'num': 0.0, 'word': ''}, 'fair': {'num': 0.2857142857142857, 'word': '一纸空文;报应;尔虞我诈;欺骗'}, 'general': {'num': 0.07142857142857142, 'word': '幸福'}, 'libe': {'num': 0.0, 'word': ''}, 'loya': {'num': 0.07142857142857142, 'word': '英勇战斗'}, 'mode': {'num': 0.0, 'word': ''}, 'resi': {'num': 0.0, 'word': ''}, 'sanc': {'num': 0.07142857142857142, 'word': '尊严'}, 'wast': {'num': 0.0, 'word': ''}}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file cmfd-0.2.1.tar.gz
.
File metadata
- Download URL: cmfd-0.2.1.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.11.3 pkginfo/1.8.3 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.64.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 396735a9db0f085b065fff3e277a8d9a2de2f2eaaa94c692ee0b17c5e9d5c383 |
|
MD5 | 256560d21e698456f3bc1d1b24313b5e |
|
BLAKE2b-256 | d21b06f58d425a0c7b149c0744b08aaf0b53da0a47a7372cc75b3aef4bbb0da2 |