1 package com.acumenvelocity.ath.mt.confidence;
2
3 import java.util.List;
4
5 import net.sf.okapi.common.resource.TextFragment;
6
7 public class VertexDataStructures {
8
9 public static class TranslationComparisonResult {
10 private final List<ScoredSegmentTranslations> scoredSegments;
11
12 public TranslationComparisonResult(List<ScoredSegmentTranslations> scoredSegments) {
13 this.scoredSegments = scoredSegments;
14 }
15
16 public List<ScoredSegmentTranslations> getScoredSegments() {
17 return scoredSegments;
18 }
19 }
20
21 public static class ScoredSegmentTranslations {
22 private final int segmentId;
23 private final String sourceText;
24 private final TextFragment sourceTf;
25 private final List<ScoredTranslation> scoredTranslations;
26
27 public ScoredSegmentTranslations(int segmentId, String sourceText, TextFragment sourceTf,
28 List<ScoredTranslation> scoredTranslations) {
29 this.segmentId = segmentId;
30 this.sourceText = sourceText;
31 this.sourceTf = sourceTf;
32 this.scoredTranslations = scoredTranslations;
33 }
34
35 public int getSegmentId() {
36 return segmentId;
37 }
38
39 public String getSourceText() {
40 return sourceText;
41 }
42
43 public List<ScoredTranslation> getScoredTranslations() {
44 return scoredTranslations;
45 }
46
47 public TextFragment getSourceTf() {
48 return sourceTf;
49 }
50 }
51
52 public static class ScoredTranslation {
53 private final String modelId;
54 private final String translation;
55 private final Double metricXScore;
56 private final Double fluencyScore;
57 private final Double coherenceScore;
58 private final Double groundednessScore;
59 private final Double lengthRatio;
60 private final Double copyOverlap;
61
62 public ScoredTranslation(String modelId, String translation, Double metricXScore,
63 Double fluencyScore, Double coherenceScore, Double groundednessScore, Double lengthRatio,
64 Double copyOverlap) {
65
66 super();
67 this.modelId = modelId;
68 this.translation = translation;
69 this.metricXScore = metricXScore;
70 this.fluencyScore = fluencyScore;
71 this.coherenceScore = coherenceScore;
72 this.groundednessScore = groundednessScore;
73 this.lengthRatio = lengthRatio;
74 this.copyOverlap = copyOverlap;
75 }
76
77 public String getModelId() {
78 return modelId;
79 }
80
81 public String getTranslation() {
82 return translation;
83 }
84
85 public Double getMetricXScore() {
86 return metricXScore;
87 }
88
89 public Double getFluencyScore() {
90 return fluencyScore;
91 }
92
93 public Double getCoherenceScore() {
94 return coherenceScore;
95 }
96
97 public Double getGroundednessScore() {
98 return groundednessScore;
99 }
100
101 public Double getLengthRatio() {
102 return lengthRatio;
103 }
104
105 public Double getCopyOverlap() {
106 return copyOverlap;
107 }
108 }
109 }