Final prototype

This commit is contained in:
Inga Kirschnick 2022-08-01 10:00:12 +02:00
parent 5cbc6ea822
commit 4497567de0
2 changed files with 396 additions and 280 deletions

View File

@ -4,11 +4,11 @@ class ConcordanceQueryBuilder {
this.positionalAttrList = { this.positionalAttrList = {
'emptyToken': {prettyText: 'empty token', cqlOpening: '[', tokenValue:'', cqlClosing: ']'}, "emptyToken": {prettyText: "empty token", cqlOpening: "[", tokenValue:"", cqlClosing: "]"},
'word': {prettyText: 'word', cqlOpening: '[word=', tokenValue: '', cqlClosing: ']'}, "word": {prettyText: "word", cqlOpening: "[word=", tokenValue: "", cqlClosing: "]"},
'lemma': {prettyText: 'lemma', cqlOpening: '[lemma=', tokenValue:'', cqlClosing: ']'}, "lemma": {prettyText: "lemma", cqlOpening: "[lemma=", tokenValue:"", cqlClosing: "]"},
'pos': {prettyText: 'pos', cqlOpening: '[pos=', tokenValue:'', cqlClosing: ']'}, "pos": {prettyText: "pos", cqlOpening: "[pos=", tokenValue:"", cqlClosing: "]"},
'simplePos': {prettyText: 'simple_pos', cqlOpening: '[simple_pos=', tokenValue:'', cqlClosing: ']'} "simplePos": {prettyText: "simple_pos", cqlOpening: "[simple_pos=", tokenValue:"", cqlClosing: "]"}
} }
this.elements = { this.elements = {
@ -18,138 +18,148 @@ class ConcordanceQueryBuilder {
queryContent:[], queryContent:[],
//#region QueryBuilder Elements //#region QueryBuilder Elements
concordanceQueryBuilder: document.querySelector('#concordance-query-builder'), concordanceQueryBuilder: document.querySelector("#concordance-query-builder"),
concordanceQueryBuilderButton: document.querySelector('#concordance-query-builder-button'), concordanceQueryBuilderButton: document.querySelector("#concordance-query-builder-button"),
positionalAttr: document.querySelector('#token-attr'), positionalAttr: document.querySelector("#token-attr"),
structuralAttr: document.querySelector('#structural-attr'), structuralAttr: document.querySelector("#structural-attr"),
buttonPreparer: document.querySelector('#button-preparer'), buttonPreparer: document.querySelector("#button-preparer"),
yourQuery: document.querySelector('#your-query'), yourQuery: document.querySelector("#your-query"),
insertQueryButton: document.querySelector('#insert-query-button'), insertQueryButton: document.querySelector("#insert-query-button"),
tokenQuery: document.querySelector('#token-query'), tokenQuery: document.querySelector("#token-query"),
tokenBuilderContent: document.querySelector('#token-builder-content'), tokenBuilderContent: document.querySelector("#token-builder-content"),
buildTokenButton: document.querySelector('#build-token-button'), buildTokenButton: document.querySelector("#build-token-button"),
extFormQuery: document.querySelector('#concordance-extension-form-query'),
//#endregion QueryBuilder Elements //#endregion QueryBuilder Elements
//#region Strucutral Attributes //#region Strucutral Attributes
sentence:document.querySelector('#sentence'), sentence:document.querySelector("#sentence"),
entity: document.querySelector('#entity'), entity: document.querySelector("#entity"),
textAnnotation: document.querySelector('#text-annotation'), textAnnotation: document.querySelector("#text-annotation"),
entityBuilder: document.querySelector('#entity-builder'), entityBuilder: document.querySelector("#entity-builder"),
englishEntType: document.querySelector('#english-ent-type'), englishEntType: document.querySelector("#english-ent-type"),
emptyEntity: document.querySelector('#empty-entity'), germanEntType: document.querySelector("#german-ent-type"),
emptyEntity: document.querySelector("#empty-entity"),
entityAnyType: false,
textAnnotationBuilder: document.querySelector('#text-annotation-builder'), textAnnotationBuilder: document.querySelector("#text-annotation-builder"),
textAnnotationOptions: document.querySelector('#text-annotation-options'), textAnnotationOptions: document.querySelector("#text-annotation-options"),
textAnnotationInput: document.querySelector('#text-annotation-input'), textAnnotationInput: document.querySelector("#text-annotation-input"),
textAnnotationSubmit: document.querySelector('#text-annotation-submit'), textAnnotationSubmit: document.querySelector("#text-annotation-submit"),
//#endregion Structural Attributes //#endregion Structural Attributes
//#region Token Attributes //#region Token Attributes
tokenCounter: 0, tokenCounter: 0,
lemma: document.querySelector('#lemma'), lemma: document.querySelector("#lemma"),
emptyToken: document.querySelector('#empty-token'), emptyToken: document.querySelector("#empty-token"),
word: document.querySelector('#word'), word: document.querySelector("#word"),
lemma: document.querySelector('#lemma'), lemma: document.querySelector("#lemma"),
pos: document.querySelector('#pos'), pos: document.querySelector("#pos"),
simplePosButton: document.querySelector('#simple-pos-button'), simplePosButton: document.querySelector("#simple-pos-button"),
incidenceModifiers: document.querySelector('[data-target="incidence-modifiers"]'), incidenceModifiers: document.querySelector("[data-target='incidence-modifiers']"),
or: document.querySelector('#or'), or: document.querySelector("#or"),
and: document.querySelector('#and'), and: document.querySelector("#and"),
//#region Word and Lemma Elements //#region Word and Lemma Elements
wordBuilder: document.querySelector('#word-builder'), wordBuilder: document.querySelector("#word-builder"),
lemmaBuilder: document.querySelector('#lemma-builder'), lemmaBuilder: document.querySelector("#lemma-builder"),
inputOptions: document.querySelector('#input-options'), inputOptions: document.querySelector("#input-options"),
wordInput: document.querySelector('#word-input'), wordInput: document.querySelector("#word-input"),
wordSubmit: document.querySelector('#word-submit'), wordSubmit: document.querySelector("#word-submit"),
lemmaInput: document.querySelector('#lemma-input'), lemmaInput: document.querySelector("#lemma-input"),
lemmaSubmit: document.querySelector('#lemma-submit'), lemmaSubmit: document.querySelector("#lemma-submit"),
ignoreCaseCheckbox : document.querySelector('#ignore-case-checkbox'), ignoreCaseCheckbox : document.querySelector("#ignore-case-checkbox"),
ignoreCase: document.querySelector('input[type="checkbox"]'), ignoreCase: document.querySelector("input[type='checkbox']"),
wildcardChar: document.querySelector('#wildcard-char'), wildcardChar: document.querySelector("#wildcard-char"),
optionGroup: document.querySelector('#option-group'), optionGroup: document.querySelector("#option-group"),
incidenceModifiersTB: document.querySelector('[data-target="incidence-modifiers-text-builder"]'), incidenceModifiersTB: document.querySelector("[data-target='incidence-modifiers-text-builder']"),
//#endregion Word and Lemma Elements //#endregion Word and Lemma Elements
//#region posBuilder Elements //#region posBuilder Elements
posBuilder: document.querySelector('#pos-builder'), posBuilder: document.querySelector("#pos-builder"),
englishPos: document.querySelector('#english-pos'), englishPos: document.querySelector("#english-pos"),
germanPos: document.querySelector('#german-pos'), germanPos: document.querySelector("#german-pos"),
//#endregion posBuilder Elements //#endregion posBuilder Elements
//#region simple_posBuilder Elements //#region simple_posBuilder Elements
simplePosBuilder: document.querySelector('#simplepos-builder'), simplePosBuilder: document.querySelector("#simplepos-builder"),
simplePos: document.querySelector('#simple-pos'), simplePos: document.querySelector("#simple-pos"),
//#endregion simple_posBuilder Elements //#endregion simple_posBuilder Elements
//#region incidence modifiers //#region incidence modifiers
oneOrMore: document.querySelector('#one-or-more'), oneOrMore: document.querySelector("#one-or-more"),
zeroOrMore: document.querySelector('#zero-or-more'), zeroOrMore: document.querySelector("#zero-or-more"),
zeroOrOne: document.querySelector('#zero-or-one'), zeroOrOne: document.querySelector("#zero-or-one"),
exactlyN: document.querySelector('#exactly-n'), exactlyN: document.querySelector("#exactlyN"),
betweenNM: document.querySelector('#between-n-m'), betweenNM: document.querySelector("#betweenNM"),
nInput: document.querySelector("#n-input"),
nSubmit: document.querySelector("#n-submit"),
nmInput: document.querySelector("#n-m-input"),
mInput: document.querySelector("#m-input"),
nmSubmit: document.querySelector("#n-m-submit"),
oneOrMoreTB: document.querySelector('#one-or-more-tb'), oneOrMoreTB: document.querySelector("#one-or-more-tb"),
zeroOrMoreTB: document.querySelector('#zero-or-more-tb'), zeroOrMoreTB: document.querySelector("#zero-or-more-tb"),
zeroOrOneTB: document.querySelector('#zero-or-one-tb'), zeroOrOneTB: document.querySelector("#zero-or-one-tb"),
exactlyNTB: document.querySelector('#exactly-n-tb'), exactlyNTB: document.querySelector("#exactly-n-tb"),
betweenNMTB: document.querySelector('#between-n-m-tb') betweenNMTB: document.querySelector("#between-n-m-tb")
//#endregion incidence modifiers //#endregion incidence modifiers
//#endregion Token Attributes //#endregion Token Attributes
} }
this.elements.concordanceQueryBuilderButton.addEventListener('click', () => {this.clearAll();}); this.elements.concordanceQueryBuilderButton.addEventListener("click", () => {this.clearAll();});
this.elements.insertQueryButton.addEventListener("click", () => {this.insertQuery();});
//#region Structural Attribute Event Listeners //#region Structural Attribute Event Listeners
this.elements.sentence.addEventListener('click', () => {this.addSentence();}); this.elements.sentence.addEventListener("click", () => {this.addSentence();});
this.elements.entity.addEventListener('click', () => {this.addEntity();}); this.elements.entity.addEventListener("click", () => {this.addEntity();});
this.elements.textAnnotation.addEventListener('click', () => {this.addTextAnnotation();}); this.elements.textAnnotation.addEventListener("click", () => {this.addTextAnnotation();});
this.elements.englishEntType.addEventListener('change', () => {this.englishEntTypeHandler();}); this.elements.englishEntType.addEventListener("change", () => {this.englishEntTypeHandler();});
this.elements.emptyEntity.addEventListener('click', () => {this.emptyEntityButton();}); this.elements.germanEntType.addEventListener("change", () => {this.germanEntTypeHandler();});
this.elements.emptyEntity.addEventListener("click", () => {this.emptyEntityButton();});
this.elements.textAnnotationSubmit.addEventListener('click', () => {this.textAnnotationSubmitHandler();}); this.elements.textAnnotationSubmit.addEventListener("click", () => {this.textAnnotationSubmitHandler();});
//#endregion //#endregion
//#region Token Attribute Event Listeners //#region Token Attribute Event Listeners
this.elements.buildTokenButton.addEventListener('click', () => {this.addToken();}); this.elements.buildTokenButton.addEventListener("click", () => {this.addToken();});
this.elements.emptyToken.addEventListener('click', () => {this.emptyTokenHandler();}); this.elements.emptyToken.addEventListener("click", () => {this.emptyTokenHandler();});
this.elements.word.addEventListener('click', () => {this.wordBuilder();}); this.elements.word.addEventListener("click", () => {this.wordBuilder();});
this.elements.lemma.addEventListener('click', () => {this.lemmaBuilder();}); this.elements.lemma.addEventListener("click", () => {this.lemmaBuilder();});
this.elements.pos.addEventListener('click', () => {this.posBuilder();}); this.elements.pos.addEventListener("click", () => {this.posBuilder();});
this.elements.simplePosButton.addEventListener('click', () => {this.simplePosBuilder();}); this.elements.simplePosButton.addEventListener("click", () => {this.simplePosBuilder();});
this.elements.or.addEventListener('click', () => {this.orHandler();}); this.elements.or.addEventListener("click", () => {this.orHandler();});
this.elements.and.addEventListener('click', () => {this.andHandler();}); this.elements.and.addEventListener("click", () => {this.andHandler();});
this.elements.ignoreCase.addEventListener('change', () => {this.inputOptionHandler(this.elements.ignoreCase);}); this.elements.ignoreCase.addEventListener("change", () => {this.inputOptionHandler(this.elements.ignoreCase);});
this.elements.wildcardChar.addEventListener('click', () => {this.inputOptionHandler(this.elements.wildcardChar);}); this.elements.wildcardChar.addEventListener("click", () => {this.inputOptionHandler(this.elements.wildcardChar);});
this.elements.optionGroup.addEventListener('click', () => {this.inputOptionHandler(this.elements.optionGroup);}); this.elements.optionGroup.addEventListener("click", () => {this.inputOptionHandler(this.elements.optionGroup);});
this.elements.wordSubmit.addEventListener('click', () => {this.textSubmit();}); this.elements.wordSubmit.addEventListener("click", () => {this.textSubmit();});
this.elements.lemmaSubmit.addEventListener('click', () => {this.textSubmit();}); this.elements.lemmaSubmit.addEventListener("click", () => {this.textSubmit();});
this.elements.englishPos.addEventListener('change', () => {this.englishPosHandler();}); this.elements.englishPos.addEventListener("change", () => {this.englishPosHandler();});
this.elements.germanPos.addEventListener('change', () => {this.germanPosHandler();}); this.elements.germanPos.addEventListener("change", () => {this.germanPosHandler();});
this.elements.simplePos.addEventListener('change', () => {this.simplePosHandler();}); this.elements.simplePos.addEventListener("change", () => {this.simplePosHandler();});
this.elements.oneOrMore.addEventListener('click', () => {this.incidenceModifiersHandler(this.elements.oneOrMore);}); this.elements.oneOrMore.addEventListener("click", () => {this.incidenceModifiersHandler(this.elements.oneOrMore);});
this.elements.zeroOrMore.addEventListener('click', () => {this.incidenceModifiersHandler(this.elements.zeroOrMore);}); this.elements.zeroOrMore.addEventListener("click", () => {this.incidenceModifiersHandler(this.elements.zeroOrMore);});
this.elements.zeroOrOne.addEventListener('click', () => {this.incidenceModifiersHandler(this.elements.zeroOrOne);}); this.elements.zeroOrOne.addEventListener("click", () => {this.incidenceModifiersHandler(this.elements.zeroOrOne);});
this.elements.exactlyN.addEventListener('click', () => {this.incidenceModifiersHandler(this.elements.exactlyN);}); this.elements.nSubmit.addEventListener("click", () => {this.nSubmitHandler();});
this.elements.betweenNM.addEventListener('click', () => {this.incidenceModifiersHandler(this.elements.betweenNM);}); this.elements.nmSubmit.addEventListener("click", () => {this.nmSubmitHandler();});
this.elements.oneOrMoreTB.addEventListener('click', () => {this.incidenceModifiersHandlerTB(this.elements.oneOrMoreTB);}); this.elements.oneOrMoreTB.addEventListener("click", () => {this.incidenceModifiersHandlerTB(this.elements.oneOrMoreTB);});
this.elements.zeroOrMoreTB.addEventListener('click', () => {this.incidenceModifiersHandlerTB(this.elements.zeroOrMoreTB);}); this.elements.zeroOrMoreTB.addEventListener("click", () => {this.incidenceModifiersHandlerTB(this.elements.zeroOrMoreTB);});
this.elements.zeroOrOneTB.addEventListener('click', () => {this.incidenceModifiersHandlerTB(this.elements.zeroOrOneTB);}); this.elements.zeroOrOneTB.addEventListener("click", () => {this.incidenceModifiersHandlerTB(this.elements.zeroOrOneTB);});
this.elements.exactlyNTB.addEventListener('click', () => {this.incidenceModifiersHandlerTB(this.elements.exactlyNTB);}); this.elements.exactlyNTB.addEventListener("click", () => {this.incidenceModifiersHandlerTB(this.elements.exactlyNTB);});
this.elements.betweenNMTB.addEventListener('click', () => {this.incidenceModifiersHandlerTB(this.elements.betweenNMTB);}); this.elements.betweenNMTB.addEventListener("click", () => {this.incidenceModifiersHandlerTB(this.elements.betweenNMTB);});
//#endregion Token Attribute Event Listeners //#endregion Token Attribute Event Listeners
@ -160,57 +170,75 @@ class ConcordanceQueryBuilder {
//#region Structural Attribute Builder Functions //#region Structural Attribute Builder Functions
addSentence() { addSentence() {
this.hideEverything(); this.hideEverything();
if(this.elements.sentence.text === "End Sentence") { if(this.elements.sentence.text === 'End Sentence') {
this.buttonfactory("end-sentence", "Sentence End"); this.buttonfactory('end-sentence', 'Sentence End', '</s>');
this.elements.sentence.innerHTML = "Sentence"; this.elements.sentence.innerHTML = 'Sentence';
} else { this.elements.insertQueryButton.classList.remove("disabled");
this.buttonfactory("start-sentence", "Sentence Start");
this.elements.insertQueryButton.classList.remove('disabled');
this.elements.counter += 1; this.elements.counter += 1;
this.elements.queryContent.push('sentence'); } else {
this.elements.sentence.innerHTML = "End Sentence"; this.buttonfactory('start-sentence', 'Sentence Start', '<s>');
this.elements.queryContent.push("sentence");
this.elements.sentence.innerHTML = 'End Sentence';
} }
} }
addEntity() { addEntity() {
if(this.elements.entity.text === "End Entity"){ if(this.elements.entity.text === 'End Entity'){
this.buttonfactory("end-entity", "Entity End"); let queryText;
this.elements.entity.innerHTML = "Entity"; if (this.elements.entityAnyType === false){
queryText = '</ent_type>';
} else {
queryText = '</ent>';
}
this.buttonfactory('end-entity', 'Entity End', queryText);
this.elements.entity.innerHTML = 'Entity';
this.elements.insertQueryButton.classList.remove("disabled");
this.elements.counter += 1;
} else { } else {
this.hideEverything(); this.hideEverything();
this.elements.entityBuilder.classList.remove('hide'); this.elements.entityBuilder.classList.remove("hide");
} }
} }
englishEntTypeHandler() { englishEntTypeHandler() {
this.buttonfactory("start-entity", "Entity Type=" + this.elements.englishEntType.value); this.buttonfactory('start-entity', 'Entity Type=' + this.elements.englishEntType.value, '<ent_type="' + this.elements.englishEntType.value + '">');
this.elements.insertQueryButton.classList.remove('disabled'); this.elements.entity.innerHTML = 'End Entity';
this.elements.counter+=1;
this.elements.entity.innerHTML = "End Entity";
this.hideEverything(); this.hideEverything();
this.elements.entityAnyType = false;
}
germanEntTypeHandler() {
this.buttonfactory('start-entity', 'Entity Type=' + this.elements.germanEntType.value, '<ent_type="' + this.elements.germanEntType.value + '">');
this.elements.entity.innerHTML = 'End Entity';
this.hideEverything();
this.elements.entityAnyType = false;
} }
emptyEntityButton() { emptyEntityButton() {
this.buttonfactory("start-entity", "Entity Start"); this.buttonfactory('start-empty-entity', 'Entity Start', '<ent>');
this.elements.counter+=1; this.elements.entity.innerHTML = 'End Entity';
this.elements.entity.innerHTML = "End Entity";
this.hideEverything(); this.hideEverything();
this.elements.entityAnyType = true;
} }
addTextAnnotation() { addTextAnnotation() {
this.hideEverything(); this.hideEverything();
this.elements.textAnnotationBuilder.classList.remove('hide'); this.elements.textAnnotationBuilder.classList.remove("hide");
} }
textAnnotationSubmitHandler() { textAnnotationSubmitHandler() {
this.buttonfactory("tA" + this.elements.textAnnotationOptions.value, this.elements.textAnnotationOptions.value + "= " + this.elements.textAnnotationInput.value) let queryText = ':: match.text_' + this.elements.textAnnotationOptions.value + '="' + this.elements.textAnnotationInput.value + '"';
this.buttonfactory('text-annotation', this.elements.textAnnotationOptions.value + '= ' + this.elements.textAnnotationInput.value, queryText);
this.elements.insertQueryButton.classList.remove("disabled");
this.elements.counter+=1; this.elements.counter+=1;
this.hideEverything(); this.hideEverything();
this.elements.textAnnotationInput.value = ""; this.elements.textAnnotationInput.value = '';
} }
@ -219,240 +247,255 @@ class ConcordanceQueryBuilder {
//#region Token Attribute Builder Functions //#region Token Attribute Builder Functions
emptyTokenHandler() { emptyTokenHandler() {
this.hideEverything(); this.hideEverything();
this.elements.incidenceModifiers.classList.remove("hide"); this.elements.incidenceModifiers.classList.remove('hide');
this.tokenButtonfactory("emptyToken", "empty token"); this.tokenButtonfactory('emptyToken', 'empty token', '[]');
this.buttonDisabler("empty"); this.buttonDisabler('empty');
this.elements.buildTokenButton.classList.remove('disabled'); this.elements.buildTokenButton.classList.remove("disabled");
this.elements.tokenCounter+=1; this.elements.tokenCounter+=1;
} }
wordBuilder() { wordBuilder() {
this.elements.incidenceModifiers.classList.add("hide"); this.elements.incidenceModifiers.classList.add('hide');
this.hideEverything(); this.hideEverything();
this.elements.wordBuilder.classList.remove('hide'); this.elements.wordBuilder.classList.remove("hide");
this.elements.inputOptions.classList.remove('hide'); this.elements.inputOptions.classList.remove("hide");
this.elements.ignoreCaseCheckbox.classList.remove('hide'); this.elements.ignoreCaseCheckbox.classList.remove("hide");
this.elements.incidenceModifiersTB.classList.remove('disabled');
} }
lemmaBuilder() { lemmaBuilder() {
this.elements.incidenceModifiers.classList.add("hide"); this.elements.incidenceModifiers.classList.add('hide');
this.hideEverything(); this.hideEverything();
this.elements.lemmaBuilder.classList.remove('hide'); this.elements.lemmaBuilder.classList.remove("hide");
this.elements.inputOptions.classList.remove('hide'); this.elements.inputOptions.classList.remove("hide");
this.elements.ignoreCaseCheckbox.classList.remove('hide'); this.elements.ignoreCaseCheckbox.classList.remove("hide");
this.elements.incidenceModifiersTB.classList.remove('disabled');
} }
inputOptionHandler(elem) { inputOptionHandler(elem) {
let input; let input;
if (this.elements.wordBuilder.classList.contains("hide") === false){ if (this.elements.wordBuilder.classList.contains('hide') === false){
input = this.elements.wordInput; input = this.elements.wordInput;
}else{ }else{
input = this.elements.lemmaInput; input = this.elements.lemmaInput;
} }
if (elem === this.elements.optionGroup) { if (elem === this.elements.optionGroup) {
input.value += "( option1 | option2 )"; input.value += '( option1 | option2 )';
let firstIndex = input.value.indexOf("option1"); let firstIndex = input.value.indexOf('option1');
let lastIndex = firstIndex + "option1".length; let lastIndex = firstIndex + 'option1'.length;
input.focus(); input.focus();
input.setSelectionRange(firstIndex, lastIndex); input.setSelectionRange(firstIndex, lastIndex);
}else if (elem === this.elements.wildcardChar){ }else if (elem === this.elements.wildcardChar){
input.value += "."; input.value += '.';
} }
} }
textSubmit() { textSubmit() {
this.buttonDisabler(); this.buttonDisabler();
this.elements.incidenceModifiers.classList.remove('disabled'); this.elements.incidenceModifiers.classList.remove("disabled");
let c; let c;
if (this.elements.ignoreCase.checked){ if (this.elements.ignoreCase.checked){
c = "%c"; c = ' %c';
}else{ }else{
c = ""; c = '';
} }
if (this.elements.wordBuilder.classList.contains("hide") === false){ if (this.elements.wordBuilder.classList.contains('hide') === false){
this.tokenButtonfactory("word", "word=" + this.elements.wordInput.value + c); this.tokenButtonfactory('word', 'word=' + this.elements.wordInput.value + c, 'word="'+ this.elements.wordInput.value + '"' + c );
this.elements.buildTokenButton.classList.remove('disabled'); this.elements.buildTokenButton.classList.remove("disabled");
this.elements.tokenCounter+=1; this.elements.tokenCounter+=1;
this.elements.wordInput.value = ""; this.elements.wordInput.value = '';
}else if (this.elements.lemmaBuilder.classList.contains("hide") === false){ }else if (this.elements.lemmaBuilder.classList.contains('hide') === false){
this.tokenButtonfactory("lemma", "lemma=" + this.elements.lemmaInput.value + c); this.tokenButtonfactory('lemma', 'lemma=' + this.elements.lemmaInput.value + c, 'lemma="'+ this.elements.lemmaInput.value + '"' + c);
this.elements.buildTokenButton.classList.remove('disabled'); this.elements.buildTokenButton.classList.remove("disabled");
this.elements.tokenCounter+=1; this.elements.tokenCounter+=1;
this.elements.lemmaInput.value = ""; this.elements.lemmaInput.value = '';
} }
} }
posBuilder() { posBuilder() {
this.hideEverything(); this.hideEverything();
this.elements.incidenceModifiers.classList.remove("hide"); this.elements.incidenceModifiers.classList.remove('hide');
this.elements.positionalAttr.appendChild(this.elements.incidenceModifiers); this.elements.positionalAttr.appendChild(this.elements.incidenceModifiers);
this.elements.posBuilder.classList.remove('hide'); this.elements.posBuilder.classList.remove("hide");
} }
englishPosHandler() { englishPosHandler() {
this.buttonDisabler(); this.buttonDisabler();
this.tokenButtonfactory("pos", "pos=" + this.elements.englishPos.value); this.tokenButtonfactory('pos', 'pos=' + this.elements.englishPos.value, 'pos="' + this.elements.englishPos.value + '"');
this.elements.buildTokenButton.classList.remove('disabled'); this.elements.buildTokenButton.classList.remove("disabled");
this.elements.tokenCounter+=1; this.elements.tokenCounter+=1;
} }
germanPosHandler() { germanPosHandler() {
this.buttonDisabler(); this.buttonDisabler();
this.tokenButtonfactory("pos", "pos=" + this.elements.germanPos.value); this.tokenButtonfactory('pos', 'pos=' + this.elements.germanPos.value, 'pos="' + this.elements.germanPos.value + '"');
this.elements.buildTokenButton.classList.remove('disabled'); this.elements.buildTokenButton.classList.remove("disabled");
this.elements.tokenCounter+=1; this.elements.tokenCounter+=1;
} }
simplePosBuilder() { simplePosBuilder() {
this.hideEverything(); this.hideEverything();
this.elements.incidenceModifiers.classList.remove("hide"); this.elements.incidenceModifiers.classList.remove('hide');
this.elements.positionalAttr.appendChild(this.elements.incidenceModifiers); this.elements.positionalAttr.appendChild(this.elements.incidenceModifiers);
this.elements.simplePosBuilder.classList.remove('hide'); this.elements.simplePosBuilder.classList.remove("hide");
} }
simplePosHandler() { simplePosHandler() {
this.buttonDisabler(); this.buttonDisabler();
this.tokenButtonfactory("simplePos", "simple_pos=" + this.elements.simplePos.value); this.tokenButtonfactory('simplePos', 'simple_pos=' + this.elements.simplePos.value, 'simple_pos="' + this.elements.simplePos.value + '"');
this.elements.buildTokenButton.classList.remove('disabled'); this.elements.buildTokenButton.classList.remove("disabled");
this.elements.tokenCounter+=1; this.elements.tokenCounter+=1;
} }
incidenceModifiersHandler(input) { incidenceModifiersHandler(input) {
if (input.id === "exactly-n"){
} else if (input.id === "between-n-m"){ this.tokenButtonfactory('incidenceModifier', input.text, input.dataset.token);
this.elements.incidenceModifiers.classList.add("disabled");
} else { this.elements.tokenCounter+=1;
this.tokenButtonfactory("incidenceModifier", input.text);
}
this.elements.incidenceModifiers.classList.add('disabled');
this.elements.tokenCounter+=1;
} }
nSubmitHandler() {
this.tokenButtonfactory('exactlyN', 'Exactly ' + this.elements.nInput.value, '{' + this.elements.nInput.value + '}');
let instance = M.Modal.getInstance(this.elements.exactlyN);
instance.close();
this.elements.incidenceModifiers.classList.add('disabled');
}
nmSubmitHandler() {
this.tokenButtonfactory('betweenNM', 'Between ' + this.elements.nmInput.value + ' and ' + this.elements.mInput.value, '{' + this.elements.nmInput.value + ',' + this.elements.mInput.value + '}');
let instance = M.Modal.getInstance(this.elements.betweenNM);
instance.close();
this.elements.incidenceModifiers.classList.add('disabled');
}
// TB = Text Builder
incidenceModifiersHandlerTB(elem) { incidenceModifiersHandlerTB(elem) {
let input; let input;
if (this.elements.wordBuilder.classList.contains("hide") === false){ if (this.elements.wordBuilder.classList.contains('hide') === false){
input = this.elements.wordInput; input = this.elements.wordInput;
}else{ }else{
input = this.elements.lemmaInput; input = this.elements.lemmaInput;
} }
if (elem.id === 'exactly-n-tb'){
if (elem.id === "exactly-n-tb"){
input.value += elem.dataset.token; input.value += elem.dataset.token;
let index = input.value.lastIndexOf("{n}"); let index = input.value.lastIndexOf('{n}');
let instance = M.Dropdown.getInstance(this.elements.incidenceModifiersTB); let instance = M.Dropdown.getInstance(this.elements.incidenceModifiersTB);
instance.close(); instance.close();
input.focus(); input.focus();
input.setSelectionRange(index+1, index+2); input.setSelectionRange(index+1, index+2);
}else if (elem.id === "between-n-m-tb") { }else if (elem.id === 'between-n-m-tb') {
input.value += input.dataset.token; input.value += elem.dataset.token;
let index = input.value.lastIndexOf("{n,m}"); let index = input.value.lastIndexOf('{n,m}');
let instance = M.Dropdown.getInstance(this.elements.incidenceModifiersTB); let instance = M.Dropdown.getInstance(this.elements.incidenceModifiersTB);
instance.close(); instance.close();
input.focus(); input.focus();
input.setSelectionRange(index+1, index+2); input.setSelectionRange(index+1, index+2);
}else { }else {
input.value += " " + elem.dataset.token; input.value += ' ' + elem.dataset.token;
} }
this.elements.incidenceModifiersTB.classList.add('disabled');
} }
orHandler() { orHandler() {
this.elements.positionalAttr.appendChild(this.elements.incidenceModifiers); this.elements.positionalAttr.appendChild(this.elements.incidenceModifiers);
this.buttonDisabler("condition"); this.buttonDisabler('condition');
this.hideEverything(); this.hideEverything();
this.tokenButtonfactory("or", "or"); this.tokenButtonfactory('or', 'or', '|');
this.elements.buildTokenButton.classList.remove('disabled'); this.elements.buildTokenButton.classList.remove("disabled");
this.elements.tokenCounter+=1; this.elements.tokenCounter+=1;
} }
andHandler() { andHandler() {
this.elements.positionalAttr.appendChild(this.elements.incidenceModifiers); this.elements.positionalAttr.appendChild(this.elements.incidenceModifiers);
this.buttonDisabler("condition"); this.buttonDisabler('condition');
this.hideEverything(); this.hideEverything();
this.tokenButtonfactory("and", "and"); this.tokenButtonfactory('and', 'and', '&');
this.elements.buildTokenButton.classList.remove('disabled'); this.elements.buildTokenButton.classList.remove("disabled");
this.elements.tokenCounter+=1; this.elements.tokenCounter+=1;
} }
hideEverything(){ hideEverything(){
this.elements.wordBuilder.classList.add('hide'); this.elements.wordBuilder.classList.add("hide");
this.elements.lemmaBuilder.classList.add('hide'); this.elements.lemmaBuilder.classList.add("hide");
this.elements.ignoreCaseCheckbox.classList.add('hide'); this.elements.ignoreCaseCheckbox.classList.add("hide");
this.elements.inputOptions.classList.add('hide'); this.elements.inputOptions.classList.add("hide");
this.elements.posBuilder.classList.add('hide'); this.elements.posBuilder.classList.add("hide");
this.elements.simplePosBuilder.classList.add('hide'); this.elements.simplePosBuilder.classList.add("hide");
this.elements.entityBuilder.classList.add('hide'); this.elements.entityBuilder.classList.add("hide");
this.elements.textAnnotationBuilder.classList.add('hide'); this.elements.textAnnotationBuilder.classList.add("hide");
} }
buttonDisabler(attr = "token") { buttonDisabler(attr = 'token') {
let tokenButtonList = this.elements.positionalAttr.querySelectorAll('a'); let tokenButtonList = this.elements.positionalAttr.querySelectorAll("a");
if (attr === "start"){ if (attr === 'start'){
tokenButtonList.forEach(element => { tokenButtonList.forEach(element => {
if (element.id === "or"){ if (element.id === 'or'){
element.classList.add('disabled'); element.classList.add("disabled");
} else if (element.id === "and"){ } else if (element.id === 'and'){
element.classList.add('disabled'); element.classList.add("disabled");
}else if (element.dataset.target == "incidence-modifiers") { }else if (element.dataset.target == 'incidence-modifiers') {
element.classList.add('disabled'); element.classList.add("disabled");
} else if (element.id === "empty-token"){ } else if (element.id === 'empty-token'){
element.classList.remove('disabled'); element.classList.remove("disabled");
} else { } else {
element.classList.remove('disabled'); element.classList.remove("disabled");
} }
}); });
}else if (attr === "condition"){ }else if (attr === 'condition'){
tokenButtonList.forEach(element => { tokenButtonList.forEach(element => {
if (element.id === "or"){ if (element.id === 'or'){
element.classList.add('disabled'); element.classList.add("disabled");
} else if (element.id === "and"){ } else if (element.id === 'and'){
element.classList.add('disabled'); element.classList.add("disabled");
}else if (element.dataset.target == "incidence-modifiers") { }else if (element.dataset.target == 'incidence-modifiers') {
element.classList.add('disabled'); element.classList.add("disabled");
} else if (element.id === "empty-token"){ } else if (element.id === 'empty-token'){
element.classList.add('disabled'); element.classList.add("disabled");
} else { } else {
element.classList.remove('disabled'); element.classList.remove("disabled");
} }
}); });
}else if (attr === "empty") { }else if (attr === 'empty') {
tokenButtonList.forEach(element => { tokenButtonList.forEach(element => {
if (element.id == "or"){ if (element.id == 'or'){
element.classList.add('disabled'); element.classList.add("disabled");
} else if (element.id == "and"){ } else if (element.id == 'and'){
element.classList.add('disabled'); element.classList.add("disabled");
}else if (element.dataset.target == "incidence-modifiers") { }else if (element.dataset.target == 'incidence-modifiers') {
element.classList.remove('disabled'); element.classList.remove("disabled");
} else { } else {
element.classList.add('disabled'); element.classList.add("disabled");
} }
}); });
}else{ }else{
tokenButtonList.forEach(element => { tokenButtonList.forEach(element => {
if (element.id == "or"){ if (element.id == 'or'){
element.classList.remove('disabled'); element.classList.remove("disabled");
} else if (element.id == "and"){ } else if (element.id == 'and'){
element.classList.remove('disabled'); element.classList.remove("disabled");
}else if (element.dataset.target == "incidence-modifiers") { }else if (element.dataset.target == 'incidence-modifiers') {
element.classList.remove('disabled'); element.classList.remove("disabled");
} else { } else {
element.classList.add('disabled'); element.classList.add("disabled");
} }
}); });
} }
} }
tokenButtonfactory(dataType, prettyText) { tokenButtonfactory(dataType, prettyText, tokenText) {
this.elements.buttonPreparer.innerHTML += "<a class='btn-small waves-effect waves-light' style='margin-left:3px' data-type='" + dataType + "'>" + prettyText + "</a>"; tokenText = encodeURI(tokenText);
let tokenDummyButton = this.elements.buttonPreparer.querySelector(":first-child"); this.elements.buttonPreparer.innerHTML += '<a class="btn-small waves-effect waves-light" style="margin-left:3px" data-type="' + dataType + '" data-tokentext="' + tokenText + '">' + prettyText + '</a>';
tokenDummyButton.addEventListener('click', () => {this.deleteTokenAttr(tokenDummyButton);}); let tokenDummyButton = this.elements.buttonPreparer.querySelector(':first-child');
tokenDummyButton.addEventListener("click", () => {this.deleteTokenAttr(tokenDummyButton);});
this.elements.tokenQuery.appendChild(tokenDummyButton); this.elements.tokenQuery.appendChild(tokenDummyButton);
} }
@ -467,12 +510,12 @@ class ConcordanceQueryBuilder {
} }
if(indexOfAttr>0){ if(indexOfAttr>0){
if (attr.dataset.type === "or" || attr.dataset.type === "and") { if (attr.dataset.type === 'or' || attr.dataset.type === 'and') {
this.elements.tokenQuery.removeChild(nodesList[indexOfAttr+1]); this.elements.tokenQuery.removeChild(nodesList[indexOfAttr+1]);
this.elements.tokenCounter-=1; this.elements.tokenCounter-=1;
}else { }else {
if (nodesList[indexOfAttr-1].dataset.type === "or" || nodesList[indexOfAttr-1].dataset.type === "and"){ if (nodesList[indexOfAttr-1].dataset.type === 'or' || nodesList[indexOfAttr-1].dataset.type === 'and'){
this.elements.tokenQuery.removeChild(nodesList[indexOfAttr-1]) this.elements.tokenQuery.removeChild(nodesList[indexOfAttr-1])
this.elements.tokenCounter-=1; this.elements.tokenCounter-=1;
} }
@ -483,34 +526,49 @@ class ConcordanceQueryBuilder {
this.elements.tokenCounter-=1; this.elements.tokenCounter-=1;
if(this.elements.tokenCounter === 0){ if(this.elements.tokenCounter === 0){
this.elements.buildTokenButton.classList.add('disabled'); this.elements.buildTokenButton.classList.add("disabled");
this.buttonDisabler("start"); this.buttonDisabler('start');
this.hideEverything(); this.hideEverything();
} }
} }
addToken() { addToken() {
let tokenQueryContent = ""; let tokenQueryContent = '';
this.elements.tokenQuery.childNodes.forEach(element => { let tokenQueryText = '';
tokenQueryContent += " " + element.text + " " let emptyTokenCheck = false;
});
this.buttonfactory("token", tokenQueryContent); for (let element of this.elements.tokenQuery.childNodes) {
tokenQueryContent = ""; tokenQueryContent += ' ' + element.text + ' ';
this.elements.tokenQuery.innerHTML = ""; tokenQueryText += ' ' + decodeURI(element.dataset.tokentext);
if (element.dataset.type === "emptyToken"){
emptyTokenCheck = true;
}
}
if (emptyTokenCheck === false){
tokenQueryText = '[' + tokenQueryText + ']';
}
this.buttonfactory('token', tokenQueryContent, tokenQueryText);
tokenQueryContent = '';
this.elements.tokenQuery.innerHTML = '';
this.elements.tokenCounter = 0; this.elements.tokenCounter = 0;
this.elements.buildTokenButton.classList.add('disabled'); this.elements.buildTokenButton.classList.add("disabled");
this.hideEverything(); this.hideEverything();
this.buttonDisabler("start") this.buttonDisabler('start');
this.elements.insertQueryButton.classList.remove("disabled");
this.elements.counter += 1;
} }
//#endregion Token Attribute Builder Functions //#endregion Token Attribute Builder Functions
//#region General Functions //#region General Functions
buttonfactory(dataType, prettyText) { buttonfactory(dataType, prettyText, queryText) {
this.elements.buttonPreparer.innerHTML += "<a class='btn-small waves-effect waves-light' style='margin-left:3px' data-type='" + dataType + "'>" + prettyText + "</a>"; queryText = encodeURI(queryText);
let dummyButton = this.elements.buttonPreparer.querySelector(":first-child"); this.elements.buttonPreparer.innerHTML += '<a class="btn-small waves-effect waves-light" style="margin-left:3px" data-type="' + dataType + '" data-query="' + queryText + '">' + prettyText + '</a>';
dummyButton.addEventListener('click', () => {this.deleteAttr(dummyButton);}); let dummyButton = this.elements.buttonPreparer.querySelector(':first-child');
dummyButton.addEventListener("click", () => {this.deleteAttr(dummyButton);});
this.elements.yourQuery.appendChild(dummyButton); this.elements.yourQuery.appendChild(dummyButton);
} }
@ -521,88 +579,96 @@ class ConcordanceQueryBuilder {
let indexOfAttr; let indexOfAttr;
let connectedElement; let connectedElement;
// Why nodesList.indexOf(attr) doesn't work?! // Why nodesList.indexOf(attr) doesn"t work?!
for (let i = 0; i < nodesList.length; i++) { for (let i = 0; i < nodesList.length; i++) {
if(nodesList[i] === attr){ if(nodesList[i] === attr){
indexOfAttr = i; indexOfAttr = i;
} }
} }
switch (attr.dataset.type) { switch (attr.dataset.type) {
case "start-sentence": case 'start-sentence':
for (let i = indexOfAttr; i < nodesList.length; i++) { for (let i = indexOfAttr; i < nodesList.length; i++) {
if (nodesList[i].dataset.type === "end-sentence"){ if (nodesList[i].dataset.type === 'end-sentence'){
siblingList.push(nodesList[i]); siblingList.push(nodesList[i]);
} }
} }
connectedElement = siblingList[0]; connectedElement = siblingList[0];
if (connectedElement === undefined){
this.elements.sentence.innerHTML = 'Sentence';
}
break; break;
case "end-sentence": case 'end-sentence':
for (let i = 0; i < indexOfAttr; i++) { for (let i = 0; i < indexOfAttr; i++) {
if (nodesList[i].dataset.type === "start-sentence"){ if (nodesList[i].dataset.type === 'start-sentence'){
siblingList.push(nodesList[i]); siblingList.push(nodesList[i]);
} }
} }
connectedElement = siblingList[siblingList.length -1]; connectedElement = siblingList[siblingList.length -1];
break; break;
case "start-entity": case 'start-entity':
for (let i = indexOfAttr; i < nodesList.length; i++) { for (let i = indexOfAttr; i < nodesList.length; i++) {
if (nodesList[i].dataset.type === "end-entity"){ if (nodesList[i].dataset.type === 'end-entity'){
siblingList.push(nodesList[i]); siblingList.push(nodesList[i]);
} }
} }
connectedElement = siblingList[0]; connectedElement = siblingList[0];
if (connectedElement === undefined){
this.elements.entity.innerHTML = 'Entity';
}
break; break;
case "end-entity": case 'end-entity':
for (let i = 0; i < indexOfAttr; i++) { for (let i = 0; i < indexOfAttr; i++) {
if (nodesList[i].dataset.type === "start-entity"){ if (nodesList[i].dataset.type === 'start-entity'){
siblingList.push(nodesList[i]); siblingList.push(nodesList[i]);
} }
} }
connectedElement = siblingList[siblingList.length -1]; connectedElement = siblingList[siblingList.length -1];
break; break;
default: default:
connectedElement = ""; connectedElement = undefined;
break; break;
} }
if (connectedElement !== ""){ if (connectedElement !== undefined ){
this.elements.yourQuery.removeChild(connectedElement); this.elements.yourQuery.removeChild(connectedElement);
} }
this.elements.yourQuery.removeChild(attr); this.elements.yourQuery.removeChild(attr);
this.elements.counter -= 1; this.elements.counter -= 1;
if(this.elements.counter === 0){ if(this.elements.counter === 0){
this.elements.insertQueryButton.classList.add('disabled'); this.elements.insertQueryButton.classList.add("disabled");
} }
} }
insertQuery() { insertQuery() {
this.elements.yourQueryContent = [];
for (let element of this.elements.yourQuery.childNodes) {
let queryElement = decodeURI(element.dataset.query);
this.elements.yourQueryContent.push(queryElement);
}
let queryString = this.elements.yourQueryContent.join(' ');
queryString += ";";
this.elements.concordanceQueryBuilder.classList.add('modal-close');
this.elements.extFormQuery.value = queryString;
// this.elements.tokenQuery.childNodes.forEach(element => {
// this.elements.tokenQueryContent.push([element.dataset.type, element.text]);
// });
// for (let key in this.positionalAttrList) {
// if (this.positionalAttrList.hasOwnProperty(key)){
// for (let i = 0; i < this.elements.tokenQueryContent.length; i++) {
// if(key === this.elements.tokenQueryContent[i][0]){
// console.log(this.positionalAttrList[key]['prettyText']);
// }
// }
// }
// }
} }
clearAll() { clearAll() {
this.elements.tokenQuery.innerHTML = ""; this.elements.tokenQuery.innerHTML = '';
this.elements.tokenCounter = 0; this.elements.tokenCounter = 0;
this.elements.counter = 0; this.elements.counter = 0;
this.elements.buildTokenButton.classList.add('disabled'); this.elements.buildTokenButton.classList.add("disabled");
this.elements.insertQueryButton.classList.add('disabled'); this.elements.insertQueryButton.classList.add("disabled");
this.elements.concordanceQueryBuilder.classList.remove('modal-close');
this.hideEverything(); this.hideEverything();
this.buttonDisabler("start"); this.buttonDisabler('start');
this.elements.yourQuery.innerHTML = ""; this.elements.yourQuery.innerHTML = '';
} }
//#endregion General Functions //#endregion General Functions
} }

View File

@ -268,18 +268,43 @@
<p></p> <p></p>
<br> <br>
<div class="row"> <div class="row">
<a class="btn waves-effect waves-light col s3 l2" id="empty-entity">Add Entity of any type</a> <a class="btn waves-effect waves-light col s4" id="empty-entity">Add Entity of any type</a>
<p class="col s1 l1"></p> <p class="col s1 l1"></p>
<div class= "input-field col s4 l3"> <div class= "input-field col s3">
<select name="englishenttype" id="english-ent-type"> <select name="englishenttype" id="english-ent-type">
<option value="" disabled selected>English ent_type</option> <option value="" disabled selected>English ent_type</option>
<option value="CARDINAL">CARDINAL</option> <option value="CARDINAL">CARDINAL</option>
<option value="DATE">DATE</option> <option value="DATE">DATE</option>
<option value="EVENT">EVENT</option> <option value="EVENT">EVENT</option>
<option value="FAC">FAC</option>
<option value="GPE">GPE</option>
<option value="LANGUAGE">LANGUAGE</option>
<option value="LAW">LAW</option>
<option value="LOC">LOC</option>
<option value="MONEY">MONEY</option>
<option value="NORP">NORP</option>
<option value="ORDINAL">ORDINAL</option>
<option value="ORG">ORG</option>
<option value="PERCENT">PERCENT</option>
<option value="PERSON">PERSON</option>
<option value="PRODUCT">PRODUCT</option>
<option value="QUANTITY">QUANTITY</option>
<option value="TIME">TIME</option>
<option value="WORK_OF_ART">WORK_OF_ART</option>
</select> </select>
<label>Entity Type</label> <label>Entity Type</label>
</div> </div>
<div class= "input-field col s3">
<select name="germanenttype" id="german-ent-type">
<option value="" disabled selected>German ent_type</option>
<option value="LOC">LOC</option>
<option value="MISC">MISC</option>
<option value="ORG">ORG</option>
<option value="PER">PER</option>
</select>
</div>
</div> </div>
<div data-inga=""></div>
</div> </div>
@ -298,7 +323,7 @@
<option class="btn-small waves-effect waves-light" value="journal">journal</option> <option class="btn-small waves-effect waves-light" value="journal">journal</option>
<option class="btn-small waves-effect waves-light" value="pages">pages</option> <option class="btn-small waves-effect waves-light" value="pages">pages</option>
<option class="btn-small waves-effect waves-light" value="publisher">publisher</option> <option class="btn-small waves-effect waves-light" value="publisher">publisher</option>
<option class="btn-small waves-effect waves-light" value="publishing year">publishing year</option> <option class="btn-small waves-effect waves-light" value="publishing_year">publishing year</option>
<option class="btn-small waves-effect waves-light" value="school">school</option> <option class="btn-small waves-effect waves-light" value="school">school</option>
<option class="btn-small waves-effect waves-light" value="title">title</option> <option class="btn-small waves-effect waves-light" value="title">title</option>
</select> </select>
@ -318,8 +343,6 @@
</div> </div>
</div> </div>
{# #region test #}
<div id="positional-attr"> <div id="positional-attr">
<p></p> <p></p>
<div class="row"> <div class="row">
@ -335,7 +358,6 @@
</div> </div>
</div> </div>
<div id="token-builder-content"> <div id="token-builder-content">
{# #endregion test #}
<div class="row"> <div class="row">
@ -399,6 +421,15 @@
<option value="ADD">email</option> <option value="ADD">email</option>
<option value="AFX">affix</option> <option value="AFX">affix</option>
<option value="CC">conjunction, coordinating</option> <option value="CC">conjunction, coordinating</option>
<option value="CD">cardinal number</option>
<option value="DT">determiner</option>
<option value="EX">existential there</option>
<option value="FW">foreign word</option>
<option value="HYPH">punctuation mark, hyphen</option>
<option value="IN">conjunction, subordinating or preposition</option>
<option value="JJ">adjective</option>
<option value="JJR">adjective, comparative</option>
<option value="JJS">adjective, superlative</option>
</select> </select>
<label>Part-of-speech tags</label> <label>Part-of-speech tags</label>
</div> </div>
@ -408,6 +439,11 @@
<option value="ADJA">adjective, attributive</option> <option value="ADJA">adjective, attributive</option>
<option value="ADJD">adjective, adverbial or predicative</option> <option value="ADJD">adjective, adverbial or predicative</option>
<option value="ADV">adverb</option> <option value="ADV">adverb</option>
<option value="APPO">postposition</option>
<option value="APPR">preposition; circumposition left</option>
<option value="APPRART">preposition with article</option>
<option value="APZR">circumposition right</option>
<option value="ART">definite or indefinite article</option>
</select> </select>
</div> </div>
</div> </div>
@ -423,6 +459,20 @@
<option value="ADJ">adjective</option> <option value="ADJ">adjective</option>
<option value="ADP">adposition</option> <option value="ADP">adposition</option>
<option value="ADV">adverb</option> <option value="ADV">adverb</option>
<option value="AUX">auxiliary verb</option>
<option value="CONJ">coordinating conjunction</option>
<option value="DET">determiner</option>
<option value="INTJ">interjection</option>
<option value="NOUN">noun</option>
<option value="NUM">numeral</option>
<option value="PART">particle</option>
<option value="PRON">pronoun</option>
<option value="PROPN">proper noun</option>
<option value="PUNCT">punctuation</option>
<option value="SCONJ">subordinating conjunction</option>
<option value="SYM">symbol</option>
<option value="VERB">verb</option>
<option value="X">other</option>
</select> </select>
<label>Simple part-of-speech tags</label> <label>Simple part-of-speech tags</label>
</div> </div>