Fork TermSuite on GitHub.

Exporting terminologies

JSON

Option 1

TermSuiteFactory
    .createJsonExporter()
    .export(indexedCorpus, Paths.get("path/to/termino.json"));

With custom JSON options:

TermSuiteFactory
    .createJsonExporter(new JsonOptions().withOccurrences(false))
    .export(indexedCorpus, Paths.get("path/to/termino.json"));

Option 2

IndexedCorpusIO.toJson(
  indexedCorpus,
  new FileWriter("path/to/termino.json"), new JsonOptions());

TSV

TermSuiteFactory
    .createTsvExporter()
    .export(indexedCorpus, Paths.get("path/to/termino.tsv"));

With custom TSV options:

TermSuiteFactory
    .createTsvExporter(
      new TsvOptions()
        .properties(
          TermProperty.PILOT,
          TermProperty.FREQ,
          TermProperty.INDEPENDANCE,
          TermProperty.DOCUMENT_FREQUENCY
    ))
    .export(indexedCorpus, Paths.get("path/to/termino.tsv"));

TBX

See TBX Specifications for more information.

TermSuiteFactory
    .createTbxExporter()
    .export(indexedCorpus, Paths.get("path/to/termino.tbx"));

Importing terminologies

JSON

IndexedCorpus indexedCorpus = IndexedCorpusIO.fromJson(Paths.get("path/to/termino.json"));
Terminology terminology = indexedCorpus.getTerminology();