Commit 866efac6 authored by stefan's avatar stefan

solved bug in loading French conversations

parent 4c65ccba
......@@ -237,12 +237,11 @@ public abstract class AbstractDocument extends AnalysisElement {
DialogismComputations.determineVoices(this);
DialogismComputations.determineExtendedVoices(this);
DialogismComputations.findSentimentUsingContext(this);
// DialogismComputations.findSentimentUsingContext(this);
// determine voice distributions & importance
LOGGER.info("Determine voice distributions & importance");
DialogismComputations.determineVoiceDistributions(this);
DialogismComputations.determineExtendedVoiceDistributions(this);
// DialogismComputations.determineExtendedVoiceDistributions(this);
}
// build coherence graph
......@@ -366,7 +365,12 @@ public abstract class AbstractDocument extends AnalysisElement {
fos = new FileOutputStream(new File(getPath().replace(".xml", ".ser")));
try (ObjectOutputStream out = new ObjectOutputStream(fos)) {
out.writeObject(this);
} catch (Exception ex) {
ex.printStackTrace();
} catch (Error ex) {
ex.printStackTrace();
}
} catch (IOException ex) {
Exceptions.printStackTrace(ex);
}
......@@ -459,8 +463,7 @@ public abstract class AbstractDocument extends AnalysisElement {
out.write(t.getWord().getLemma() + " (");
if (t.getElement() instanceof Word) {
out.write(t.getWord().getPOS());
}
else {
} else {
NGram nGram = (NGram) t.getElement();
StringBuilder sb = new StringBuilder();
for (Word word : nGram.getWords()) {
......@@ -468,9 +471,9 @@ public abstract class AbstractDocument extends AnalysisElement {
}
String nGramLemmas = sb.toString();
sb.setLength(0);
out.write(nGramLemmas.substring(0,nGramLemmas.length()-1));
out.write(nGramLemmas.substring(0, nGramLemmas.length() - 1));
}
out.write ("),"
out.write("),"
+ Formatting.formatNumber(t.getRelevance()) + ","
+ Formatting.formatNumber(t.getTermFrequency()) + "," + Formatting.formatNumber(t.getSemanticSimilarity()) + "\n");
}
......
......@@ -484,7 +484,7 @@ public class Conversation extends AbstractDocument {
Collaboration.evaluateSocialKB(this);
setVoicePMIEvolution(DialogismMeasures.getCollaborationEvolution(this));
setVoiceExtendedEvolution(DialogismMeasures.getExtendedCollaborationEvolution(this));
// setVoiceExtendedEvolution(DialogismMeasures.getExtendedCollaborationEvolution(this));
// Collaboration.printIntenseCollabZones(this);
DialogismComputations.determineParticipantInterAnimation(this);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment