New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for #63 Consider mn and mfn genders #64
Merged
chmeyer
merged 4 commits into
dkpro:master
from
highsource:bugfix/63-Consider-mn-mfn-genders
Aug 9, 2018
Merged
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
64 changes: 64 additions & 0 deletions
64
src/main/java/de/tudarmstadt/ukp/jwktl/parser/de/components/DEGendersText.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,64 @@ | ||
/******************************************************************************* | ||
* Copyright 2013 | ||
* Ubiquitous Knowledge Processing (UKP) Lab | ||
* Technische Universität Darmstadt | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
******************************************************************************/ | ||
package de.tudarmstadt.ukp.jwktl.parser.de.components; | ||
|
||
import java.text.MessageFormat; | ||
import java.util.Arrays; | ||
import java.util.Collections; | ||
import java.util.List; | ||
import java.util.Objects; | ||
|
||
import de.tudarmstadt.ukp.jwktl.api.util.GrammaticalGender; | ||
|
||
public enum DEGendersText { | ||
|
||
M("m", GrammaticalGender.MASCULINE), | ||
F("f", GrammaticalGender.FEMININE), | ||
N("n", GrammaticalGender.NEUTER), | ||
SAECHLICH("sächlich", GrammaticalGender.NEUTER), | ||
MF("mf", GrammaticalGender.MASCULINE, GrammaticalGender.FEMININE), | ||
MN_DOT("mn.", GrammaticalGender.MASCULINE, GrammaticalGender.NEUTER), | ||
MN("mn", GrammaticalGender.MASCULINE, GrammaticalGender.NEUTER), | ||
FM("fm", GrammaticalGender.FEMININE, GrammaticalGender.MASCULINE), | ||
FN("fn", GrammaticalGender.FEMININE, GrammaticalGender.NEUTER), | ||
NM("nm", GrammaticalGender.NEUTER, GrammaticalGender.MASCULINE), | ||
NF("nf", GrammaticalGender.NEUTER, GrammaticalGender.FEMININE), | ||
MFN("mfn", GrammaticalGender.MASCULINE, GrammaticalGender.FEMININE, GrammaticalGender.NEUTER); | ||
|
||
private final String genderText; | ||
private final List<GrammaticalGender> genders; | ||
|
||
private DEGendersText(String genderText, GrammaticalGender... genders) { | ||
this.genderText = genderText; | ||
this.genders = Collections.unmodifiableList(Arrays.asList(genders)); | ||
} | ||
|
||
public List<GrammaticalGender> asGrammaticalGenders() { | ||
return this.genders; | ||
} | ||
|
||
public static DEGendersText of(String genderText) { | ||
Objects.requireNonNull(genderText, "genderText must not be null"); | ||
for (DEGendersText value : values()) { | ||
if (Objects.equals(genderText, value.genderText)) { | ||
return value; | ||
} | ||
} | ||
throw new IllegalArgumentException(MessageFormat.format("Unrecognized gender text [{0}].", genderText)); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
== Flipchart ({{Sprache|Deutsch}}) == | ||
=== {{Wortart|Substantiv|Deutsch}}, {{mfn}} === | ||
|
||
{{Deutsch Substantiv Übersicht | ||
|Genus 1=n | ||
|Genus 2=m | ||
|Genus 3=f | ||
|Nominativ Singular 1=Flipchart | ||
|Nominativ Singular 2=Flipchart | ||
|Nominativ Singular 3=Flipchart | ||
|Nominativ Plural=Flipcharts | ||
|Genitiv Singular 1=Flipcharts | ||
|Genitiv Singular 2=Flipcharts | ||
|Genitiv Singular 3=Flipchart | ||
|Genitiv Plural=Flipcharts | ||
|Dativ Singular 1=Flipchart | ||
|Dativ Singular 2=Flipchart | ||
|Dativ Singular 3=Flipchart | ||
|Dativ Plural=Flipcharts | ||
|Akkusativ Singular 1=Flipchart | ||
|Akkusativ Singular 2=Flipchart | ||
|Akkusativ Singular 3=Flipchart | ||
|Akkusativ Plural=Flipcharts | ||
|Bild=Flipchart1-Asio.JPG|180px|1|Ein Flipchart | ||
}} | ||
|
||
{{Alternative Schreibweisen}} | ||
:[[Flip-Chart]] | ||
|
||
{{Worttrennung}} | ||
:Flip·chart, {{Pl.}} Flip·charts | ||
|
||
{{Aussprache}} | ||
:{{IPA}} {{Lautschrift|ˈflɪpʧaːɐ̯t}}, {{Lautschrift|ˈflɪpʧaʁt}} | ||
:{{Hörbeispiele}} {{Audio|De-Flipchart.ogg}} | ||
|
||
{{Bedeutungen}} | ||
:[1] ein großer auf einem Gestell befestigter Papierblock, dessen Blätter man beschreiben und nach hinten umblättern kann | ||
|
||
{{Herkunft}} | ||
:von dem englischen Begriff [[flip chart]] (deutsch: [[Umblätterdiagramm]]) mit gleicher Bedeutung | ||
|
||
{{Beispiele}} | ||
:[1] Während des Vortrags zeichnete er den neuen Arbeitsablauf auf einem ''Flipchart'' auf. | ||
|
||
{{Absatz}} | ||
==== {{Übersetzungen}} ==== | ||
{{Ü-Tabelle|Ü-links= | ||
*{{en}}: [1] {{Ü|en|flip chart}} | ||
|Ü-rechts= | ||
*{{fr}}: [] {{Ü|fr|}} | ||
*{{sv}}: [1] {{Ü|sv|blädderblock}} | ||
}} | ||
|
||
{{Referenzen}} | ||
:[1] {{Wikipedia|Flipchart}} | ||
:[*] {{Ref-Canoo|Flipchart}} | ||
:[1] {{Ref-UniLeipzig|Flipchart}} | ||
:[1] {{Ref-Duden|Flipchart}} | ||
|
||
[[Kategorie:Entlehnung aus dem Englischen (Deutsch)]] |
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,58 @@ | ||
== Tetragraph ({{Sprache|Deutsch}}) == | ||
=== {{Wortart|Substantiv|Deutsch}}, {{mn}} === | ||
|
||
{{Deutsch Substantiv Übersicht | ||
|Genus 1=m | ||
|Genus 2=n | ||
|Nominativ Singular 1=Tetragraph | ||
|Nominativ Singular 2=Tetragraph | ||
|Nominativ Plural=Tetragraphen | ||
|Genitiv Singular 1=Tetragraphen | ||
|Genitiv Singular 2=Tetragraphs | ||
|Genitiv Plural=Tetragraphen | ||
|Dativ Singular 1=Tetragraphen | ||
|Dativ Singular 2=Tetragraph | ||
|Dativ Plural=Tetragraphen | ||
|Akkusativ Singular 1=Tetragraphen | ||
|Akkusativ Singular 2=Tetragraph | ||
|Akkusativ Plural=Tetragraphen | ||
}} | ||
|
||
{{Alternative Schreibweisen}} | ||
:[[Tetragraf]] | ||
|
||
{{Worttrennung}} | ||
:Te·t·ra·graph, {{Pl.}} Te·t·ra·gra·phen | ||
|
||
{{Aussprache}} | ||
:{{IPA}} {{Lautschrift|tetʀaˈɡʀaːf}} | ||
:{{Hörbeispiele}} {{Audio|}} | ||
:{{Reime}} {{Reim|aːf|Deutsch}} | ||
|
||
{{Bedeutungen}} | ||
:[1] ''[[Linguistik]]:'' Folge von vier Buchstaben, die einen einzigen Laut repräsentieren | ||
|
||
{{Gegenwörter}} | ||
:[1] [[Digraph]], [[Trigraph]] | ||
|
||
{{Oberbegriffe}} | ||
:[1] [[Graph]] | ||
|
||
{{Beispiele}} | ||
:[1] Im Deutschen steht der ''Tetragraph'' "tsch" für den Laut [ʧ]. | ||
:[1] „»Der obligatorische Wechsel zum Kyrillischen hat groteske Verrenkungen erforderlich gemacht, so die Verwendung von diakritischen Zeichen, von Digraphen, Trigraphen und sogar - zur Darstellung des entstimmten aspirierten labialisierten uvularen Plosivs im Kabardinischen - von einem ''Tetragraphen''«.“<ref>{{Literatur | Autor=Jonathan Littell | Titel=Die Wohlgesinnten | Verlag=Berliner Taschenbuch Verlag | Ort=Berlin | Jahr=2009 (französisches Original 2006)| ISBN=978-3-8333-0628-0}}, Seite 306f.</ref> | ||
|
||
==== {{Übersetzungen}} ==== | ||
{{Ü-Tabelle|Ü-links= | ||
*{{en}}: [1] {{Ü|en|}} | ||
*{{fr}}: [1] {{Ü|fr|}} | ||
|Ü-rechts= | ||
*{{es}}: [1] {{Ü|es|}} | ||
}} | ||
|
||
{{Referenzen}} | ||
:[1] {{Wikipedia|Digraph (Linguistik)#Trigraph, Tetragraph, …}} | ||
|
||
{{Quellen}} | ||
|
||
[[Kategorie:Fremdwort]] |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we want to keep compatibility to DEPartOfSpeechHandler, let's add "w" => FEM as well (see line 102 in the original code)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok,
w
just does not seem to occur anymore.