From 04b025c3f04f334339246dfefd27a414e7559b7d Mon Sep 17 00:00:00 2001 From: Leonardo macOS Date: Thu, 6 Jun 2024 15:13:15 +0200 Subject: [PATCH] resolved errors, mostly spaces, dots etc. One true error was a mixup of el and ella in spanish --- .../impl/spanish/PpktIndividualSpanish.java | 4 ++-- .../PpktPhenotypicFeatureEnglishTest.java | 4 ++-- .../impl/german/PpktIndividualGermanTest.java | 6 ++--- .../spanish/PpktIndividualSpanishTest.java | 24 +++++++++---------- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/main/java/org/monarchinitiative/phenopacket2prompt/output/impl/spanish/PpktIndividualSpanish.java b/src/main/java/org/monarchinitiative/phenopacket2prompt/output/impl/spanish/PpktIndividualSpanish.java index 383cec3..2b7a87e 100644 --- a/src/main/java/org/monarchinitiative/phenopacket2prompt/output/impl/spanish/PpktIndividualSpanish.java +++ b/src/main/java/org/monarchinitiative/phenopacket2prompt/output/impl/spanish/PpktIndividualSpanish.java @@ -419,8 +419,8 @@ private String ageNotAvailable(PhenopacketSex psex) { @Override public String heSheIndividual(PhenopacketSex psex) { return switch (psex) { - case FEMALE -> "el"; - case MALE -> "ella"; + case FEMALE -> "ella"; + case MALE -> "el"; default -> "la persona"; }; } diff --git a/src/test/java/org/monarchinitiative/phenopacket2prompt/output/impl/english/PpktPhenotypicFeatureEnglishTest.java b/src/test/java/org/monarchinitiative/phenopacket2prompt/output/impl/english/PpktPhenotypicFeatureEnglishTest.java index 73bf9c7..33d8f37 100644 --- a/src/test/java/org/monarchinitiative/phenopacket2prompt/output/impl/english/PpktPhenotypicFeatureEnglishTest.java +++ b/src/test/java/org/monarchinitiative/phenopacket2prompt/output/impl/english/PpktPhenotypicFeatureEnglishTest.java @@ -22,9 +22,9 @@ public class PpktPhenotypicFeatureEnglishTest { private static Stream testGetIndividualPhenotypicFeatures() { return Stream.of( new PPKtIndividualBase.TestIndividual("46 year olf female, infantile onset", - female46yearsInfantileOnset(), new PPKtIndividualBase.TestOutcome.Ok("Cerebellar atrophy and Ataxia")), + female46yearsInfantileOnset(), new PPKtIndividualBase.TestOutcome.Ok("Cerebellar atrophy and Ataxia. ")), new PPKtIndividualBase.TestIndividual("male 4 months, congenital onset", - male4monthsCongenitalOnset(), new PPKtIndividualBase.TestOutcome.Ok("Postaxial polydactyly")) + male4monthsCongenitalOnset(), new PPKtIndividualBase.TestOutcome.Ok("Postaxial polydactyly. ")) ); } diff --git a/src/test/java/org/monarchinitiative/phenopacket2prompt/output/impl/german/PpktIndividualGermanTest.java b/src/test/java/org/monarchinitiative/phenopacket2prompt/output/impl/german/PpktIndividualGermanTest.java index 40cdc9e..3c592d8 100644 --- a/src/test/java/org/monarchinitiative/phenopacket2prompt/output/impl/german/PpktIndividualGermanTest.java +++ b/src/test/java/org/monarchinitiative/phenopacket2prompt/output/impl/german/PpktIndividualGermanTest.java @@ -20,10 +20,10 @@ public class PpktIndividualGermanTest extends PPKtIndividualBase{ private static Stream testGetIndividualDescription() { return Stream.of( - new TestIndividual("46 year olf female, infantile onset", - female46yearsInfantileOnset(), new TestOutcome.Ok("Die Probandin war eine 46-jährige Frau, die sich im Säuglingsalter mit den folgenden Symptomen vorgestellt hat: ")), + new TestIndividual("46 year old female, infantile onset", + female46yearsInfantileOnset(), new TestOutcome.Ok("Die Patientin war eine 46-jährige Frau, die sich im Säuglingsalter mit den folgenden Symptomen vorgestellt hat: ")), new TestIndividual("male 4 months, congenital onset", - male4monthsCongenitalOnset(), new TestOutcome.Ok("Der Proband war ein 4 Monate alter Säugling, der sich bei der Geburt mit den folgenden Symptomen vorgestellt hat: ")), + male4monthsCongenitalOnset(), new TestOutcome.Ok("Der Patient war ein 4 Monate alter Säugling, der sich bei der Geburt mit den folgenden Symptomen vorgestellt hat: ")), new TestIndividual("female, no onset", femaleNoAge(), new TestOutcome.Ok("Die Patientin stellte sich mit den folgenden Symptomen vor: ")), new TestIndividual("female, no HPOs", diff --git a/src/test/java/org/monarchinitiative/phenopacket2prompt/output/impl/spanish/PpktIndividualSpanishTest.java b/src/test/java/org/monarchinitiative/phenopacket2prompt/output/impl/spanish/PpktIndividualSpanishTest.java index 3fb3c15..3017a6e 100644 --- a/src/test/java/org/monarchinitiative/phenopacket2prompt/output/impl/spanish/PpktIndividualSpanishTest.java +++ b/src/test/java/org/monarchinitiative/phenopacket2prompt/output/impl/spanish/PpktIndividualSpanishTest.java @@ -20,16 +20,16 @@ public class PpktIndividualSpanishTest extends PPKtIndividualBase{ private static Stream testGetIndividualDescription() { return Stream.of( - new TestIndividual("46 year olf female, infantile onset", - female46yearsInfantileOnset(), new TestOutcome.Ok("La paciente era mujer de 46 años que se presentaba en el primer año de vida con")), + new TestIndividual("46 year old female, infantile onset", + female46yearsInfantileOnset(), new TestOutcome.Ok("La paciente era mujer de 46 años que se presentó en el primer año de vida con")), new TestIndividual("male 4 months, congenital onset", - male4monthsCongenitalOnset(), new TestOutcome.Ok("El paciente era un bebé de 4 meses que se presentaba al nacer con")), + male4monthsCongenitalOnset(), new TestOutcome.Ok("El paciente era un bebé de 4 meses que se presentó al nacer con")), new TestIndividual("female, no onset", - femaleNoAge(), new TestOutcome.Ok("La paciente se presentaba con")), + femaleNoAge(), new TestOutcome.Ok("La paciente se presentó con")), new TestIndividual("female, no HPOs", femaleNoHPOs(), new TestOutcome.Error(() -> new PhenolRuntimeException("No HPO annotations"))), new TestIndividual("unknown sex, no 4mo", - unknownSex4MonthOnset(), new TestOutcome.Ok("El paciente se presentaba en la niñez con")) + unknownSex4MonthOnset(), new TestOutcome.Ok("El paciente se presentó en la niñez con")) ); } @@ -56,11 +56,11 @@ void testEvaluateExpression(TestIndividual testCase) { private static Stream testGetPPKtSex() { return Stream.of( new TestIdvlHeShe("female", - PhenopacketSex.FEMALE, new TestOutcome.Ok("she")), + PhenopacketSex.FEMALE, new TestOutcome.Ok("ella")), new TestIdvlHeShe("male", - PhenopacketSex.MALE, new TestOutcome.Ok("he")), + PhenopacketSex.MALE, new TestOutcome.Ok("el")), new TestIdvlHeShe("proband", - PhenopacketSex.UNKNOWN, new TestOutcome.Ok("the individual")) + PhenopacketSex.UNKNOWN, new TestOutcome.Ok("la persona")) ); } @@ -84,13 +84,13 @@ void testPPKtSex(TestIdvlHeShe testCase) { private static Stream testIndlAtAge() { return Stream.of( new TestIdvlAtAge("congenital", - congenital, new TestOutcome.Ok("At birth")), + congenital, new TestOutcome.Ok("Al nacer")), new TestIdvlAtAge("infantile", - infantile, new TestOutcome.Ok("During the infantile period")), + infantile, new TestOutcome.Ok("Durante el período infantil")), new TestIdvlAtAge("childhood age", - childhood, new TestOutcome.Ok("During childhood")), + childhood, new TestOutcome.Ok("Durante la infancia")), new TestIdvlAtAge("46 years old", - p46y, new TestOutcome.Ok("At an age of 46 years")) + p46y, new TestOutcome.Ok("A la edad de 46 años")) ); }