-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from monarch-initiative/nl-translation
NL Translation
- Loading branch information
Showing
8 changed files
with
718 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
...java/org/monarchinitiative/phenopacket2prompt/output/impl/dutch/DutchPromptGenerator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
package org.monarchinitiative.phenopacket2prompt.output.impl.dutch; | ||
|
||
import org.monarchinitiative.phenol.ontology.data.Ontology; | ||
import org.monarchinitiative.phenopacket2prompt.model.OntologyTerm; | ||
import org.monarchinitiative.phenopacket2prompt.model.PhenopacketAge; | ||
import org.monarchinitiative.phenopacket2prompt.model.PhenopacketSex; | ||
import org.monarchinitiative.phenopacket2prompt.model.PpktIndividual; | ||
import org.monarchinitiative.phenopacket2prompt.output.PhenopacketIndividualInformationGenerator; | ||
import org.monarchinitiative.phenopacket2prompt.output.PhenopacketTextGenerator; | ||
import org.monarchinitiative.phenopacket2prompt.output.PpktPhenotypicFeatureGenerator; | ||
import org.monarchinitiative.phenopacket2prompt.output.PromptGenerator; | ||
import org.monarchinitiative.phenopacket2prompt.output.impl.dutch.PpktIndividualDutch; | ||
import org.monarchinitiative.phenopacket2prompt.output.impl.dutch.PpktTextDutch; | ||
|
||
import java.util.List; | ||
|
||
public class DutchPromptGenerator implements PromptGenerator { | ||
|
||
private final Ontology hpo; | ||
|
||
|
||
private final PhenopacketIndividualInformationGenerator ppktAgeSexGenerator; | ||
|
||
private final PhenopacketTextGenerator ppktTextGenerator; | ||
|
||
private final PpktPhenotypicFeatureGenerator ppktPhenotypicFeatureGenerator; | ||
|
||
|
||
|
||
public DutchPromptGenerator(Ontology hpo, PpktPhenotypicFeatureGenerator pfgen) { | ||
this.hpo = hpo; | ||
ppktAgeSexGenerator = new PpktIndividualDutch(); | ||
ppktTextGenerator = new PpktTextDutch(); | ||
this.ppktPhenotypicFeatureGenerator = pfgen; | ||
} | ||
|
||
@Override | ||
public String queryHeader() { | ||
return ppktTextGenerator.QUERY_HEADER(); | ||
} | ||
|
||
@Override | ||
public String getIndividualInformation(PpktIndividual ppktIndividual) { | ||
return this.ppktAgeSexGenerator.getIndividualDescription(ppktIndividual); | ||
} | ||
|
||
@Override | ||
public String formatFeatures(List<OntologyTerm> ontologyTerms) { | ||
return ppktPhenotypicFeatureGenerator.formatFeatures(ontologyTerms); | ||
} | ||
|
||
@Override | ||
public String getVignetteAtAge(PhenopacketAge page, PhenopacketSex psex, List<OntologyTerm> terms) { | ||
String ageString = this.ppktAgeSexGenerator.atAge(page); | ||
String features = formatFeatures(terms); | ||
return String.format("%s, %s presenteerde met %s", ageString, ppktAgeSexGenerator.heSheIndividual(psex), features); | ||
} | ||
|
||
} |
Oops, something went wrong.