Skip to content

Cannot make work depccg and viasock together #18

Description

@kovvalsky

depccg takes tokenized Japanese text and prints in the conll style.

~$ cat out/p61/d1997/ja.tok
まー !
この T シャツ 、 3000 円 ?
!
ぼっ たくり だ わ 。

~$ cat out/p61/d1997/ja.tok | ./ext/depccg/bin/depccg_ja -f conll --silent --pre-tokenized -m models/depccg/ja_headfinal | cut -s -f 3
1.. 2.. 3.. 4.. 
NP[case=nc,mod=nm,fin=f]
NP[case=nc,mod=nm,fin=t]\NP[case=nc,mod=nm,fin=f]
NP[case=X1,mod=X2,fin=f]/NP[case=X1,mod=X2,fin=f]
NP[case=X1,mod=X2,fin=f]/NP[case=X1,mod=X2,fin=f]
NP[case=X1,mod=X2,fin=f]/NP[case=X1,mod=X2,fin=f]
(NP[case=X1,mod=X2,fin=f]/NP[case=X1,mod=X2,fin=f])\(NP[case=X1,mod=X2,fin=f]/NP[case=X1,mod=X2,fin=f])
NP[case=X1,mod=X2,fin=f]/NP[case=X1,mod=X2,fin=f]
NP[case=nc,mod=nm,fin=f]
NP[case=nc,mod=nm,fin=t]\NP[case=nc,mod=nm,fin=f]
NP[case=nc,mod=nm,fin=f]
S[mod=X1,form=X2,fin=f]/S[mod=X1,form=X2,fin=f]
S[mod=nm,form=cont,fin=f]
S[mod=nm,form=base,fin=f]\S[mod=nm,form=cont,fin=f]
S[mod=nm,form=stem,fin=f]\S[mod=nm,form=base,fin=f]
S[mod=nm,form=stem,fin=t]\S[mod=nm,form=stem,fin=f]

When I use viasock run, it throws an error after the timeout is reached. 20 seconds is more than enough to load the model and parse the text.

~$ cat out/p61/d1997/ja.tok |./ext/viasock/viasock run --process-timeout 20 --server-timeout 90  --log log/depccg/ja.log ./ext/depccg/bin/depccg_ja -f conll --silent --pre-tokenized -m models/depccg/ja_headfinal | cut -s -f 3
2019-07-10 15:15:53,943 - viasock client - 1470 - ERROR - server stopped sending output

The log file has not more information that the error says, I guess.

tail  log/depccg/ja.log
2019-07-10 15:06:36,681 - viasock server - .viasock/sockets/5f79728e3d94a7d0227c9d9374a4faa7 - 24841 - INFO - record 1 start
2019-07-10 15:06:56,699 - viasock server - .viasock/sockets/5f79728e3d94a7d0227c9d9374a4faa7 - 24841 - INFO - killed process
2019-07-10 15:06:56,700 - viasock server - .viasock/sockets/5f79728e3d94a7d0227c9d9374a4faa7 - 24841 - ERROR - process took too long to answer
2019-07-10 15:06:56,701 - viasock server - .viasock/sockets/5f79728e3d94a7d0227c9d9374a4faa7 - 24841 - INFO - stopped
2019-07-10 15:15:32,924 - viasock server - .viasock/sockets/5f79728e3d94a7d0227c9d9374a4faa7 - 1513 - INFO - started
2019-07-10 15:15:33,923 - viasock server - .viasock/sockets/5f79728e3d94a7d0227c9d9374a4faa7 - 1513 - INFO - connection 1 start
2019-07-10 15:15:33,924 - viasock server - .viasock/sockets/5f79728e3d94a7d0227c9d9374a4faa7 - 1513 - INFO - record 1 start
2019-07-10 15:15:53,943 - viasock server - .viasock/sockets/5f79728e3d94a7d0227c9d9374a4faa7 - 1513 - INFO - killed process
2019-07-10 15:15:53,944 - viasock server - .viasock/sockets/5f79728e3d94a7d0227c9d9374a4faa7 - 1513 - ERROR - process took too long to answer
2019-07-10 15:15:53,944 - viasock server - .viasock/sockets/5f79728e3d94a7d0227c9d9374a4faa7 - 1513 - INFO - stopped

I think the default values for -t, -T, and -P parameters are fine for this procedure as each input sentnce is on a separate line and output delimiters and prelude shouldn't have effect on the failure.
p.s. I use the uptodate version of viasock.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions