arjhe / nlp_tutorial Goto Github PK
View Code? Open in Web Editor NEWNature Language Processing Practice
Nature Language Processing Practice
if load the dict with words in combo like "今天, 今天天氣, 天氣".
Jieba will cut the longest one even put high weight to the short one.
# userdict.txt
今天 15960 t
今天天氣 3 i
天氣 2657 n
import jieba
print(jieba.lcut("今天天氣"))
jieba.load_userdict("userdict.txt")
print(jieba.lcut("今天天氣"))
[今天,天氣]
[今天天氣]
cut string: 總統蔡英文論文風波延燒後,最新民調今日出爐!據親藍民調公布結果,蔡英文支持度45%,遙遙領先韓國瑜的33%,兩人差距擴大到12個百分點。顯示論文門風波,並未重創小英聲望。
output list: ['總統', '蔡', '英文', '論文風', '波延燒', '後', ',', '最新', '民調', '今日', '出爐', '!', '據親', '藍民調', '公布', '結果', ',', '蔡', '英文', '支持', '度', '45%', ',', '遙遙', '領先', '韓國瑜', '的', '33%', ',', '兩人', '差距', '擴大到', '12', '個', '百分', '點', '。', '顯示', '論文門', '風波', ',', '並未重', '創小英', '聲望', '。']
problem : '蔡', '英文', '論文風', '波延燒', '並未重', '創小英'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.