Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added English Version of README #18

Merged
merged 1 commit into from
Apr 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,17 @@ pip install cemotion
### Usage

#### Chinese Sentiment Classification

Analyze by text string
```python
# Analyze by text string

from cemotion import Cemotion

str_text1 = '配置顶级,不解释,手机需要的各个方面都很完美'
str_text2 = '院线看电影这么多年以来,这是我第一次看电影睡着了。简直是史上最大烂片!没有之一!侮辱智商!大家小心警惕!千万不要上当!再也不要看了!'

c = Cemotion()
print(f'"{str_text1}"\n预测值:{c.predict(str_text1)}', '\n')
print(f'"{str_text2}"\n预测值:{c.predict(str_text2)}' , '\n')
print(f'"{str_text1}"\nPredicted value:{c.predict(str_text1)}'\n')
print(f'"{str_text2}"\nPredicted value:{c.predict(str_text2)}'\n')
```


Expand All @@ -73,10 +73,10 @@ print(f'"{str_text2}"\n预测值:{c.predict(str_text2)}' , '\n')
```



Using a list for batch analysis

```python
# Using a list for batch analysis

from cemotion import Cemotion

list_text = ['内饰蛮年轻的,而且看上去质感都蛮好,貌似本田所有车都有点相似,满高档的!',
Expand All @@ -95,9 +95,9 @@ print(c.predict(list_text))


#### Chinese text segmentation

Segmentation of a single text
```python
# Segmentation of a single text

from cemotion import Cegmentor

text = '这辆车的内饰设计非常现代,而且用料考究,给人一种豪华的感觉。'
Expand All @@ -114,9 +114,9 @@ print(segmentation_result)
```



Using a list for batch Chinese text segmentation
```python
# Using a list for batch Chinese text segmentation

from cemotion import Cegmentor

text = '这辆车的内饰设计非常现代,而且用料考究,给人一种豪华的感觉。'
Expand Down