Some parts of this website may do not work correctly, because your browser doesn't support JavaScript or you have disabled it. In order to use all features please enable JavaScript in your browser.

Specification for writer > json-simple-writer

json-simple-writer

Writes output of a pipe in JSON format. See simple-writer for details.

Aliases

write-simple-json

Examples

tokenize --lang en ! json-simple-writer

Simple JSON output for tokenized text.

in:
I enjoy travelling.
out:
["I","enjoy","travelling","."]
tokenize --lang en ! segmenter ! json-simple-writer --tags token --spec segment

Simple JSON output for tokenized and segmentized text with both segments and tokens.

in:
I've been to many countries, e.g. Germany, France, Canada. I enjoy travelling.
out:
[["I've","been","to","many","countries",",","e.g.","Germany",",","France",",","Canada","."],["I","enjoy","travelling","."]]

Options

Allowed options:
  --fallback-tags arg   tags that should be printed out if basic tags not found
  --linear              skip cross-edges
  --no-alts             skip alternative edges
  --with-blank          do not skip edges with whitespace text
  --tags arg (=token)   basic tag or tags separated by commas (conjunction) or 
                        semicolons (alternative)
  --spec arg            specification of higher-order tags
  --with-args           if set, returns text with annotation as a hash element

Other help resources