Communication

Communication

concrete.js extensions to the Communication class

Constructor

new Communication()

Source:

Methods

addInternalReferences()

Source:

Adds internal references between data structures contained in Communication

Specifically, adds:

  • to each concrete.Section, a section.communication reference to the enclosing Communication
  • to each concrete.Sentence, a sentence.section reference to the enclosing Section
  • to each concrete.Tokenization, a tokenization.sentence reference to the enclosing Sentence

getEntityForEntityMentionUUID(uuid) → {Entity|null}

Source:

Return the Entity (or null) that has an EntityMention with the specified UUID

Parameters:
Name Type Description
uuid UUID
Returns:
Type
Entity | null

getEntityMentionSetWithToolname(toolname) → {EntityMentionSet|null}

Source:

Return the EntityMentionSet in the Communication with the specified toolname

Parameters:
Name Type Description
toolname String
Returns:
Type
EntityMentionSet | null

getEntityMentionWithUUID(uuid) → {EntityMention|null}

Source:

Return the EntityMention (or null) with the specified UUID

Parameters:
Name Type Description
uuid UUID
Returns:
Type
EntityMention | null

getFirstSentence() → {Sentence|null}

Source:

Return the first Sentence in a Communication if it exists, or null

Returns:
Type
Sentence | null

getFirstTokenization() → {Tokenization|null}

Source:

Return the first Tokenization in a Communication if it exists, or null

Returns:
Type
Tokenization | null

getSectionsAsList() → {List}

Source:

Return all Sections in a Communication as a (flat) list

Returns:
Type
List

getSentencesAsList() → {List}

Source:

Return all Sentences in a Communication as a (flat) list

Returns:
Type
List

getSentenceWithUUID(uuid) → {Sentence|null}

Source:

Return the Sentence (or null) with the specified UUID

Parameters:
Name Type Description
uuid UUID
Returns:
Type
Sentence | null

getSituationMentionWithUUID(uuid) → {SituationMention|null}

Source:

Return the SituationMention (or null) with the specified UUID

Parameters:
Name Type Description
uuid UUID
Returns:
Type
SituationMention | null

getTokenizationsAsList() → {List}

Source:

Return all Tokenizations in a Communication as a (flat) list

Returns:
Type
List

getTokenizationWithUUID(uuid) → {Tokenization|null}

Source:

Return the Tokenization (or null) with the specified UUID

Parameters:
Name Type Description
uuid UUID
Returns:
Type
Tokenization | null

getTokensForEntityMentionID(mentionId) → {Array}

Source:

Get list of token text strings for the EntityMention specified by the UUID

Parameters:
Name Type Description
mentionId UUID
Returns:

An array of token text strings

Type
Array

initFromTJSONProtocolObject(commJSONObject) → {Communication}

Source:

Initialize Communication from a TJSONProtocol object created from a Communication.

Thrift's TJSONProtocol is used to serialize objects to JSON. The objects look something like this:

{
  "1":{"str":"tests/testdata/serif_dog-bites-man.xml"},
  "2":{"rec":{"1":{"str":"a90d397a-560f-44a0-baae-c82a34e4be09"}}},
  "3":{"str":"CommunicationType.OTHER"},
  ...
}
Parameters:
Name Type Description
commJSONObject Object

An object created from a Communication using TJSONProtocol

Returns:
  • This Communication
Type
Communication

initFromTJSONProtocolString(commJSONString) → {Communication}

Source:

Initialize Communication from a TJSONProtocol string created from a Communication

Parameters:
Name Type Description
commJSONString String

A JSON string created from a Communication using TJSONProtocol

Returns:
  • This Communication
Type
Communication

toTJSONProtocolObject() → {Object}

Source:

Returns JSON object for Communication serialized using TJSONProtocol

Returns:
Type
Object

toTJSONProtocolString() → {String}

Source:

Returns JSON string for Communication serialized using TJSONProtocol

Returns:
Type
String