Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Determined22 committed Mar 15, 2018
1 parent 664ff51 commit 81136ca
Show file tree
Hide file tree
Showing 14 changed files with 14 additions and 177,248 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
*/.DS_Store
.DS_Store
.DS_Store
.idea/
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,22 @@ It looks like a portion of [MSRA corpus](http://sighan.cs.uchicago.edu/bakeoff20

### test

`python main.py --mode=test --demo_model=1521016137`
`python main.py --mode=test --demo_model=1521112368`

Please set the parameter `--demo_model` to the model which you want to test. `1521016137` is the model trained by me.
Please set the parameter `--demo_model` to the model which you want to test. `1521112368` is the model trained by me.

An official evaluation tool: [here (click 'Instructions')](http://sighan.cs.uchicago.edu/bakeoff2006/)

My test performance:

| P | R | F | F (PER)| F (LOC)| F (ORG)|
| :---: | :---: | :---: | :---: | :---: | :---: |
| 0.8979 | 0.8690 | 0.8832 | 0.8692 | 0.9088 | 0.8493
| 0.8945 | 0.8752 | 0.8847 | 0.8688 | 0.9118 | 0.8515


### demo

`python main.py --mode=demo --demo_model=1521016137`
`python main.py --mode=demo --demo_model=1521112368`

You can input one Chinese sentence and the model will return the recognition result:

Expand Down
2 changes: 2 additions & 0 deletions data.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ def sentence2id(sent, word2id):
for word in sent:
if word.isdigit():
word = '<NUM>'
elif ('\u0041' <= word <= '\u005a') or ('\u0061' <= word <= '\u007a'):
word = '<ENG>'
if word not in word2id:
word = '<UNK>'
sentence_id.append(word2id[word])
Expand Down
2 changes: 0 additions & 2 deletions data_path_save/1521016137/checkpoints/checkpoint

This file was deleted.

Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 81136ca

Please sign in to comment.