- Source:
Methods
(static) createCommunicationDiv(communication, options) → {external:jQuery_Object}
- Source:
Returns a jQuery object containing the DOM structure:
<div class="communication communication_[COMMUNICATION_UUID]">
<div class="section section_[SECTION_UUID]">
[...]
<div class="section section_[SECTION_UUID]">
[...]
concrete.widget.createCommunicationDiv
calls
concrete.widget.createSectionDiv
to create the
DOM structure for the Sections. The options
object
is passed to concrete.widget.createSectionDiv
(which passes it to concrete.widget.createSentenceDiv
,
which passes it to concrete.widget.createTokenizationDiv
).
Parameters for options
object:
convertTreebankBrackets
(Boolean): Convert Penn Treebank-style symbols for bracket characters to corresponding bracket characters. Default value: truewhitespaceTokenization
(Boolean): Use whitespace tokenization instead of character offsets specified by the Tokenization. Default value: false
Parameters:
Name | Type | Description |
---|---|---|
communication |
Communication | |
options |
Object |
Returns:
(static) createSectionDiv(section, options) → {external:jQuery_Object}
- Source:
Returns a jQuery object containing the DOM structure:
<div class="section section_[SECTION_UUID]">
<div class="sentence sentence_[SENTENCE_UUID]">
[...]
<span class="sentence_padding"> </span>
<div class="sentence sentence_[SENTENCE_UUID]">
[...]
concrete.widget.createSectionDiv
calls
concrete.widget.createSentenceDiv
to create the DOM structure for the Sentence.
See concrete.widget.createCommunicationDiv
for
a list of possible options
object parameters.
Parameters:
Name | Type | Description |
---|---|---|
section |
Section | |
options |
Object |
Returns:
(static) createSentenceDiv(sentence, options) → {external:jQuery_Object}
- Source:
Returns a jQuery object containing the DOM structure:
<div class="sentence sentence_[SENTENCE_UUID]">
<div class="tokenization tokenization_[TOKENIZATION_UUID]">
[...]
concrete.widget.createSentenceDiv
calls
concrete.widget.createTokenizationDiv
to create the DOM structure for the Sentence's Tokenization.
See concrete.widget.createCommunicationDiv
for
a list of possible options
object parameters.
Parameters:
Name | Type | Description |
---|---|---|
sentence |
Sentence | |
options |
Object |
Returns:
(static) createTokenizationDiv(tokenization, options) → {external:jQuery_Object}
- Source:
Returns a jQuery object containing the DOM structure:
<div class="tokenization_container">
<div class="tokenization tokenization_[TOKENIZATION_UUID]">
<span class="token token_[TOKENIZATION_UUID]_[TOKEN_INDEX_0]">
<span class="token_padding token_padding_[TOKENIZATION_UUID]_[TOKEN_INDEX_0]">
<span class="token token_[TOKENIZATION_UUID]_[TOKEN_INDEX_1]">
<span class="token_padding token_padding_[TOKENIZATION_UUID]_[TOKEN_INDEX_1]">
[...]
See concrete.widget.createCommunicationDiv
for
a list of possible options
object parameters.
Parameters:
Name | Type | Description |
---|---|---|
tokenization |
Tokenization | |
options |
Object |
Returns:
(static) getSelectedTokenRefSequences() → {Array.<TokenRefSequence>}
- Source:
Return a list of TokenRefSequences containing all tokens that are currently selected.
If all the selected tokens belong to the same tokenization, then there will only be one TokenRefSequence in the list. But if the selected tokens include tokens from multiple sentences or sections, multiple TokenRefSequences will be returned.
Returns:
- Type
- Array.<TokenRefSequence>
(static) getTokenRefSequenceForTokenObject(tokenObject) → {TokenRefSequence}
- Source:
Creates a new TokenRefSequence for the Token represented by specified element
Parameters:
Name | Type | Description |
---|---|---|
tokenObject |
external:jQuery_Object | jQuery object for a Token element |
Returns:
- Type
- TokenRefSequence
(static) getTokenRefSequenceForTokensMatchingSelector(tokenizationObject, selector) → {TokenRefSequence}
- Source:
Creates a new TokenRefSequence for the Tokens whose corresponding elements match selector
Parameters:
Name | Type | Description |
---|---|---|
tokenizationObject |
external:jQuery_Object | jQuery object for a Tokenization element |
selector |
String | CSS selector string, e.g. '.selected_token' |
Returns:
- Type
- TokenRefSequence