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 { ...@@ -237,12 +237,11 @@ public abstract class AbstractDocument extends AnalysisElement {
DialogismComputations.determineVoices(this); DialogismComputations.determineVoices(this);
DialogismComputations.determineExtendedVoices(this); DialogismComputations.determineExtendedVoices(this);
DialogismComputations.findSentimentUsingContext(this); // DialogismComputations.findSentimentUsingContext(this);
// determine voice distributions & importance // determine voice distributions & importance
LOGGER.info("Determine voice distributions & importance"); LOGGER.info("Determine voice distributions & importance");
DialogismComputations.determineVoiceDistributions(this); DialogismComputations.determineVoiceDistributions(this);
DialogismComputations.determineExtendedVoiceDistributions(this); // DialogismComputations.determineExtendedVoiceDistributions(this);
} }
// build coherence graph // build coherence graph
...@@ -366,7 +365,12 @@ public abstract class AbstractDocument extends AnalysisElement { ...@@ -366,7 +365,12 @@ public abstract class AbstractDocument extends AnalysisElement {
fos = new FileOutputStream(new File(getPath().replace(".xml", ".ser"))); fos = new FileOutputStream(new File(getPath().replace(".xml", ".ser")));
try (ObjectOutputStream out = new ObjectOutputStream(fos)) { try (ObjectOutputStream out = new ObjectOutputStream(fos)) {
out.writeObject(this); out.writeObject(this);
} catch (Exception ex) {
ex.printStackTrace();
} catch (Error ex) {
ex.printStackTrace();
} }
} catch (IOException ex) { } catch (IOException ex) {
Exceptions.printStackTrace(ex); Exceptions.printStackTrace(ex);
} }
...@@ -459,8 +463,7 @@ public abstract class AbstractDocument extends AnalysisElement { ...@@ -459,8 +463,7 @@ public abstract class AbstractDocument extends AnalysisElement {
out.write(t.getWord().getLemma() + " ("); out.write(t.getWord().getLemma() + " (");
if (t.getElement() instanceof Word) { if (t.getElement() instanceof Word) {
out.write(t.getWord().getPOS()); out.write(t.getWord().getPOS());
} } else {
else {
NGram nGram = (NGram) t.getElement(); NGram nGram = (NGram) t.getElement();
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
for (Word word : nGram.getWords()) { for (Word word : nGram.getWords()) {
...@@ -468,9 +471,9 @@ public abstract class AbstractDocument extends AnalysisElement { ...@@ -468,9 +471,9 @@ public abstract class AbstractDocument extends AnalysisElement {
} }
String nGramLemmas = sb.toString(); String nGramLemmas = sb.toString();
sb.setLength(0); 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.getRelevance()) + ","
+ Formatting.formatNumber(t.getTermFrequency()) + "," + Formatting.formatNumber(t.getSemanticSimilarity()) + "\n"); + Formatting.formatNumber(t.getTermFrequency()) + "," + Formatting.formatNumber(t.getSemanticSimilarity()) + "\n");
} }
...@@ -575,13 +578,13 @@ public abstract class AbstractDocument extends AnalysisElement { ...@@ -575,13 +578,13 @@ public abstract class AbstractDocument extends AnalysisElement {
out.write("\nOverlap between annotated collaboration zones and Social KB model\n" + "P=," out.write("\nOverlap between annotated collaboration zones and Social KB model\n" + "P=,"
+ results[0] + "\nR=," + results[1] + "\nF1 score=," + results[2] + "\nr=," + VectorAlgebra + results[0] + "\nR=," + results[1] + "\nF1 score=," + results[2] + "\nr=," + VectorAlgebra
.pearsonCorrelation(c.getAnnotatedCollabEvolution(), c.getSocialKBEvolution())); .pearsonCorrelation(c.getAnnotatedCollabEvolution(), c.getSocialKBEvolution()));
results = Collaboration.overlapCollaborationZones(c, c.getAnnotatedCollabZones(), results = Collaboration.overlapCollaborationZones(c, c.getAnnotatedCollabZones(),
c.getIntenseCollabZonesVoice()); c.getIntenseCollabZonesVoice());
out.write("\nOverlap between annotated collaboration zones and Voice PMI model\n" + "P=," out.write("\nOverlap between annotated collaboration zones and Voice PMI model\n" + "P=,"
+ results[0] + "\nR=," + results[1] + "\nF1 score=," + results[2] + "\nr=," + VectorAlgebra + results[0] + "\nR=," + results[1] + "\nF1 score=," + results[2] + "\nr=," + VectorAlgebra
.pearsonCorrelation(c.getAnnotatedCollabEvolution(), c.getVoicePMIEvolution())); .pearsonCorrelation(c.getAnnotatedCollabEvolution(), c.getVoicePMIEvolution()));
} }
results = Collaboration.overlapCollaborationZones(c, c.getIntenseCollabZonesSocialKB(), results = Collaboration.overlapCollaborationZones(c, c.getIntenseCollabZonesSocialKB(),
c.getIntenseCollabZonesVoice()); c.getIntenseCollabZonesVoice());
......
...@@ -484,7 +484,7 @@ public class Conversation extends AbstractDocument { ...@@ -484,7 +484,7 @@ public class Conversation extends AbstractDocument {
Collaboration.evaluateSocialKB(this); Collaboration.evaluateSocialKB(this);
setVoicePMIEvolution(DialogismMeasures.getCollaborationEvolution(this)); setVoicePMIEvolution(DialogismMeasures.getCollaborationEvolution(this));
setVoiceExtendedEvolution(DialogismMeasures.getExtendedCollaborationEvolution(this)); // setVoiceExtendedEvolution(DialogismMeasures.getExtendedCollaborationEvolution(this));
// Collaboration.printIntenseCollabZones(this); // Collaboration.printIntenseCollabZones(this);
DialogismComputations.determineParticipantInterAnimation(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