0

运行 syntaxnet 时,控制台会有很多输出。我想知道如何才能得到依赖数据。现在这是我的输出:

I syntaxnet/term_frequency_map.cc:101] Loaded 37 terms from work/models/label-map.
I syntaxnet/term_frequency_map.cc:101] Loaded 37 terms from work/models/label-map.
I syntaxnet/embedding_feature_extractor.cc:35] Features: stack(3).word stack(2).word stack(1).word stack.word input.word input(1).word input(2).word input(3).word;input.digit input.hyphen;stack.suffix(length=2) input.suffix(length=2) input(1).suffix(length=2);stack.prefix(length=2) input.prefix(length=2) input(1).prefix(length=2)
I syntaxnet/embedding_feature_extractor.cc:36] Embedding names: words;other;suffix;prefix
I syntaxnet/embedding_feature_extractor.cc:37] Embedding dims: 64;4;8;8
I syntaxnet/embedding_feature_extractor.cc:35] Features: input.word input(1).word input(2).word input(3).word stack.word stack(1).word stack(2).word stack(3).word stack.child(1).word stack.child(1).sibling(-1).word stack.child(-1).word stack.child(-1).sibling(1).word stack(1).child(1).word stack(1).child(1).sibling(-1).word stack(1).child(-1).word stack(1).child(-1).sibling(1).word stack.child(2).word stack.child(-2).word stack(1).child(2).word stack(1).child(-2).word;input.tag input(1).tag input(2).tag input(3).tag stack.tag stack(1).tag stack(2).tag stack(3).tag stack.child(1).tag stack.child(1).sibling(-1).tag stack.child(-1).tag stack.child(-1).sibling(1).tag stack(1).child(1).tag stack(1).child(1).sibling(-1).tag stack(1).child(-1).tag stack(1).child(-1).sibling(1).tag stack.child(2).tag stack.child(-2).tag stack(1).child(2).tag stack(1).child(-2).tag;stack.child(1).label stack.child(1).sibling(-1).label stack.child(-1).label stack.child(-1).sibling(1).label stack(1).child(1).label stack(1).child(1).sibling(-1).label stack(1).child(-1).label stack(1).child(-1).sibling(1).label stack.child(2).label stack.child(-2).label stack(1).child(2).label stack(1).child(-2).label
I syntaxnet/embedding_feature_extractor.cc:36] Embedding names: words;tags;labels
I syntaxnet/embedding_feature_extractor.cc:37] Embedding dims: 64;32;32
I syntaxnet/term_frequency_map.cc:101] Loaded 29448 terms from work/models/word-map.
I syntaxnet/term_frequency_map.cc:101] Loaded 29448 terms from work/models/word-map.
I syntaxnet/term_frequency_map.cc:101] Loaded 17 terms from work/models/tag-map.
I syntaxnet/term_frequency_map.cc:101] Loaded 17 terms from work/models/tag-map.
INFO:tensorflow:Building training network with parameters: feature_sizes: [20 20 12] domain_sizes: [29451    20    40]
INFO:tensorflow:Building training network with parameters: feature_sizes: [8 2 3 3] domain_sizes: [29451     5  3539  5064]
I syntaxnet/embedding_feature_extractor.cc:35] Features: stack(3).word stack(2).word stack(1).word stack.word input.word input(1).word input(2).word input(3).word;input.digit input.hyphen;stack.suffix(length=2) input.suffix(length=2) input(1).suffix(length=2);stack.prefix(length=2) input.prefix(length=2) input(1).prefix(length=2)
I syntaxnet/embedding_feature_extractor.cc:36] Embedding names: words;other;suffix;prefix
I syntaxnet/embedding_feature_extractor.cc:37] Embedding dims: 64;4;8;8
I syntaxnet/term_frequency_map.cc:101] Loaded 29448 terms from work/models/word-map.
I syntaxnet/term_frequency_map.cc:101] Loaded 17 terms from work/models/tag-map.
I syntaxnet/term_frequency_map.cc:101] Loaded 37 terms from work/models/label-map.
I syntaxnet/reader_ops.cc:141] Starting epoch 1
I syntaxnet/reader_ops.cc:141] Starting epoch 2
INFO:tensorflow:Processed 1 documents
INFO:tensorflow:Total processed documents: 1
INFO:tensorflow:num correct tokens: 0
INFO:tensorflow:total tokens: 5
INFO:tensorflow:Seconds elapsed in evaluation: 0.05, eval metric: 0.00%
I syntaxnet/term_frequency_map.cc:101] Loaded 37 terms from work/models/label-map.
I syntaxnet/embedding_feature_extractor.cc:35] Features: input.word input(1).word input(2).word input(3).word stack.word stack(1).word stack(2).word stack(3).word stack.child(1).word stack.child(1).sibling(-1).word stack.child(-1).word stack.child(-1).sibling(1).word stack(1).child(1).word stack(1).child(1).sibling(-1).word stack(1).child(-1).word stack(1).child(-1).sibling(1).word stack.child(2).word stack.child(-2).word stack(1).child(2).word stack(1).child(-2).word;input.tag input(1).tag input(2).tag input(3).tag stack.tag stack(1).tag stack(2).tag stack(3).tag stack.child(1).tag stack.child(1).sibling(-1).tag stack.child(-1).tag stack.child(-1).sibling(1).tag stack(1).child(1).tag stack(1).child(1).sibling(-1).tag stack(1).child(-1).tag stack(1).child(-1).sibling(1).tag stack.child(2).tag stack.child(-2).tag stack(1).child(2).tag stack(1).child(-2).tag;stack.child(1).label stack.child(1).sibling(-1).label stack.child(-1).label stack.child(-1).sibling(1).label stack(1).child(1).label stack(1).child(1).sibling(-1).label stack(1).child(-1).label stack(1).child(-1).sibling(1).label stack.child(2).label stack.child(-2).label stack(1).child(2).label stack(1).child(-2).label
I syntaxnet/embedding_feature_extractor.cc:36] Embedding names: words;tags;labels
I syntaxnet/embedding_feature_extractor.cc:37] Embedding dims: 64;32;32
I syntaxnet/term_frequency_map.cc:101] Loaded 29448 terms from work/models/word-map.
I syntaxnet/term_frequency_map.cc:101] Loaded 17 terms from work/models/tag-map.
INFO:tensorflow:Processed 1 documents
INFO:tensorflow:Total processed documents: 1
INFO:tensorflow:num correct tokens: 1
INFO:tensorflow:total tokens: 5
INFO:tensorflow:Seconds elapsed in evaluation: 0.05, eval metric: 20.00%
1       Jeg     _       PRON    PRON    _       3       nsubj   _       _
2       vil     _       AUX     AUX     _       3       aux     _       _
3       bestille        _       VERB    VERB    _       0       ROOT    _       _
4       en      _       DET     DET     _       5       det     _       _
5       flybillett      _       ADJ     ADJ     _       3       dobj    _       _

我想要做的是调用 python 脚本而不向控制台输出所有这些输出,只有 CONLL 数据。

4

1 回答 1

3

您可以简单地将标准错误重定向到 /dev/null:

root@67e2e1378a9b:~/models/syntaxnet# echo "I'm testing." | syntaxnet/demo.sh 2> /dev/null
Input: I 'm testing .
Parse:
testing VBG ROOT
 +-- I PRP nsubj
 +-- 'm VBP aux
 +-- . . punct
于 2016-08-27T19:47:31.260 回答