Modified translations + Added note punctuations in OneWord

This commit is contained in:
2019-02-04 14:31:29 +01:00
parent 588ce7e15c
commit b8dee86c36
6 changed files with 185 additions and 151 deletions

View File

@@ -365,7 +365,7 @@ public class XML_processing {
} else if (qName.equals("c3") || qName.equals("c1") || qName.equals("c")) {
String c3Content = eventReader.nextEvent().asCharacters().getData();
if (stats.getFilter().getNgramValue() > 1 && stats.getFilter().getNotePunctuations() &&
if (stats.getFilter().getNotePunctuations() &&
stavek.size() > 0) {
stavek.add(createWord(c3Content, c3Content, "/", "", stats.getFilter()));
@@ -774,7 +774,8 @@ public class XML_processing {
sentence.add(createWord(word, lemma, msd, word, stats.getFilter()));
inWord = false;
}
if (stats.getFilter().getNgramValue() > 1 && stats.getFilter().getNotePunctuations() && inPunctuation && sentence.size() > 0) {
// if (stats.getFilter().getNgramValue() > 1 && stats.getFilter().getNotePunctuations() && inPunctuation && sentence.size() > 0) {
if (stats.getFilter().getNotePunctuations() && inPunctuation && sentence.size() > 0) {
String punctuation = characters.getData();
sentence.add(createWord(punctuation, punctuation, "/", punctuation, stats.getFilter()));
inPunctuation = false;
@@ -1052,7 +1053,7 @@ public class XML_processing {
sentence.add(createWord(word, lemma, msd, word, stats.getFilter()));
inWord = false;
}
if (stats.getFilter().getNgramValue() > 1 && stats.getFilter().getNotePunctuations() && inPunctuation) {
if (stats.getFilter().getNotePunctuations() && inPunctuation) {
// if (stats.getFilter().getNgramValue() > 1 && stats.getFilter().getNotePunctuations() && inPunctuation && sentence.size() > 0) {
String punctuation = characters.getData();
sentence.add(createWord(punctuation, punctuation, "/", punctuation, stats.getFilter()));

View File

@@ -56,6 +56,9 @@ public class OneWordAnalysisTab {
@FXML
public Label writeMsdAtTheEndL;
@FXML
public Label notePunctuationsL;
@FXML
public Label dataLimitL;
@@ -86,6 +89,9 @@ public class OneWordAnalysisTab {
@FXML
public ImageView writeMsdAtTheEndI;
@FXML
public ImageView notePunctuationsI;
@FXML
public ImageView msdI;
@@ -122,6 +128,10 @@ public class OneWordAnalysisTab {
private CheckBox writeMsdAtTheEndChB;
private boolean writeMsdAtTheEnd;
@FXML
private CheckBox notePunctuationsChB;
private boolean notePunctuations;
@FXML
private ComboBox<String> calculateForCB;
private CalculateFor calculateFor;
@@ -494,6 +504,16 @@ public class OneWordAnalysisTab {
});
// writeMsdAtTheEndChB.setTooltip(new Tooltip(TOOLTIP_readDisplayTaxonomyChB));
notePunctuations = false;
// set
notePunctuationsChB.selectedProperty().addListener((observable, oldValue, newValue) -> {
notePunctuations = newValue;
logger.info("note punctuations: ", notePunctuations);
});
notePunctuationsChB.setSelected(false);
notePunctuationsChB.setTooltip(new Tooltip(I18N.get("message.TOOLTIP_readNotePunctuationsChB")));
notePunctuationsChB.setDisable(false);
// set default values
minimalOccurrencesTF.setText("1");
minimalOccurrences = 1;
@@ -653,6 +673,7 @@ public class OneWordAnalysisTab {
alsoVisualizeL.textProperty().bind(I18N.createStringBinding("label.alsoVisualize"));
displayTaxonomyL.textProperty().bind(I18N.createStringBinding("label.displayTaxonomy"));
writeMsdAtTheEndL.textProperty().bind(I18N.createStringBinding("label.writeMsdAtTheEnd"));
notePunctuationsL.textProperty().bind(I18N.createStringBinding("label.notePunctuations"));
dataLimitL.textProperty().bind(I18N.createStringBinding("label.dataLimit"));
msdL.textProperty().bind(I18N.createStringBinding("label.msd"));
@@ -666,6 +687,7 @@ public class OneWordAnalysisTab {
addTooltipToImage(alsoVisualizeI, I18N.createStringBinding("label.word.alsoVisualizeH"));
addTooltipToImage(displayTaxonomyI, I18N.createStringBinding("label.word.displayTaxonomyH"));
addTooltipToImage(writeMsdAtTheEndI, I18N.createStringBinding("label.word.writeMsdAtTheEndH"));
addTooltipToImage(notePunctuationsI, I18N.createStringBinding("label.wordSet.notePunctuationsH"));
addTooltipToImage(msdI, I18N.createStringBinding("label.word.msdH"));
addTooltipToImage(taxonomyI, I18N.createStringBinding("label.word.taxonomyH"));
@@ -721,6 +743,8 @@ public class OneWordAnalysisTab {
filter.setSolarFilters(solarFiltersMap);
filter.setStringLength(1);
filter.setMultipleKeys(alsoVisualize);
// filter.setNotePunctuations(true);
filter.setNotePunctuations(notePunctuations);
// setMsd must be behind alsoVisualize
filter.setMsd(msd);