Comments (15)
I'm sorry, I typed incorrect command.
The error was solved.
I still have same error...
from deep-crf.
Ok, please let me know your command.
from deep-crf.
$ deep-crf train input_train_jp.txt --delimiter=" " --dev_file input_dev_jp.txt --save_dir save_jpmodel_dir --save_name bilstm-cnn-crf_adam_jp --optimizer adam --word_emb_file jp_word_emb300.txt --word_emb_vocab_type replace_only --gpu 0
Thank you.
from deep-crf.
I think this error since your training file format input_train_jp.txt
is wrong.
Invalid input feature sizes
.
I just fix code, please use recent version and please let me know the result.
I think input_train_jp.txt
should be:
彼 O
は O
オバマ大統領 S-PERSON
です O
彼 O
は O
from deep-crf.
I got the following error.
ValueError: Invalid input feature sizes: "3". Please check at line [1298]
I checked at line 1298 in input_train_jp.txt
and I understood that the "word" has space like:
ほげ[space]ほげ[space]O
"ほげ[space]ほげ" is proper noun.
Thank you for your help to know this error cause.
Is it OK to solve this problem by using --delimiter="\t"
and input_train_jp.txt
format is like ほげ[space]ほげ[tab]O
?
from deep-crf.
I fix input_train_jp.txt
format and I run the command ($ deep-crf train input_train_jp.txt --delimiter="\t" --dev_file input_dev_jp.txt --save_dir save_jpmodel_dir --save_name bilstm-cnn-crf_adam_jp --optimizer adam --word_emb_file jp_word_emb300.txt --word_emb_vocab_type replace_only --gpu 0
), I got following error:
File "build/bdist.linux-x86_64/egg/deepcrf/__init__.py", line 66, in train
File "build/bdist.linux-x86_64/egg/deepcrf/main.py", line 102, in run
ValueError: Invalid training sizes: 0 sentences.
Any ideas?
from deep-crf.
Is it OK to solve this problem by using --delimiter="\t" and input_train_jp.txt format is like ほげ[space]ほげ[tab]O ?
Yes! I think it is a good solution.
Each sentence must be split by a blank line (empty line \n) in input_train_jp.txt
.
Note that you should put empty line (\n) between sentences. This format is called CoNLL format.
I mean if you have two sentences,
$ cat input_file.txt
Barack B−PERSON
Hussein I−PERSON
Obama E−PERSON
is O
a O
man O
. O
Yuji B−PERSON
Matsumoto E−PERSON
is O
a O
man O
. O
from deep-crf.
My input_train_jp.txt
file has blank line ("\n") between sentences (more precisely, between tweets) but I got the error...
from deep-crf.
Now your input_train_jp.txt
seems following?
あああ[tab]O
あ[tab]O
い[tab]O
う[tab]O
お[space]お[tab]O
お[tab]O
from deep-crf.
Now your input_train_jp.txt seems following?
あああ[tab]O
あ[tab]O
い[tab]O
う[tab]Oお[space]お[tab]O
お[tab]O
Yes.
from deep-crf.
OK. Can you send me your input file via e-mail if you are ok.
nanigashi03[at]
gmail.com
from deep-crf.
Or, please try replace [tab] to [space] :
お[space]お => お_お
[tab] => [space]
and please use --delimiter=" "
.
Maybe [tab] unicode causes this error?
from deep-crf.
replace [tab] to [space]:
お[space]お => お_お
[tab] => [space]
use --delimiter=" "
It worked!!!
Thank you very much for your help!!!
from deep-crf.
OK.
It seems our code or input format with [tab] will cause that error.
from deep-crf.
I see. Thank you very much.
I changed the issue title to know the content.
from deep-crf.
Related Issues (20)
- What is --dev_file option? HOT 1
- Fix typo in bi_lstm.py HOT 1
- Trained models HOT 1
- Simplify option of the predict command
- Enable combination of input data and prediction result HOT 2
- Will it support Chainer v3.0.0? HOT 2
- Chainer utils use deprecated methods
- Make stdin and stdout available for prediction HOT 2
- TypeError: coercing to Unicode: need string or buffer, list found HOT 4
- Supported tag format HOT 2
- ValueError: need more than 1 value to unpack HOT 6
- ValueError: not enough values to unpack (expected 2, got 0) HOT 1
- What is the required packages with version ? HOT 3
- ValueError: Invalid input feature sizes HOT 4
- ValueError: need more than 0 values to unpack HOT 17
- Please add (back) an optional `deterministic` argument for CNN
- ModuleNotFoundError: No module named 'deepcrf'
- --dev HOT 2
- Will it support Python 3.x? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deep-crf.