lexnlp.extract.de package¶
Subpackages¶
- lexnlp.extract.de.tests package
- Submodules
- lexnlp.extract.de.tests.test_amounts module
- lexnlp.extract.de.tests.test_citations module
- lexnlp.extract.de.tests.test_copyrights module
- lexnlp.extract.de.tests.test_court_citations module
- lexnlp.extract.de.tests.test_courts module
- lexnlp.extract.de.tests.test_dates module
- lexnlp.extract.de.tests.test_definitions module
- lexnlp.extract.de.tests.test_durations module
- lexnlp.extract.de.tests.test_geoentities module
- lexnlp.extract.de.tests.test_laws module
- lexnlp.extract.de.tests.test_percents module
- Module contents
Submodules¶
lexnlp.extract.de.amounts module¶
Amount extraction for German.
This module implements amount extraction functionality in German.
- Todo:
- Improved unit tests and case coverage
-
class
lexnlp.extract.de.amounts.
AmountParserDE
¶ Bases:
object
-
QUARTER
= 'viertel'¶
-
cleanup
(text)¶
-
parse
(text: str, return_sources=False, extended_sources=True, float_digits=4) → Generator¶ Find possible amount references in the text. :param text: text :param return_sources: return amount AND source text :param extended_sources: return data around amount itself :param float_digits: round float to N digits, don’t round if None :return: list of amounts
-
parse_annotations
(text: str, float_digits=4, return_sources=True) → Generator[[lexnlp.extract.common.annotations.amount_annotation.AmountAnnotation, None], None]¶ Find possible amount references in the text. :param text: text :param return_sources: return amount AND source text :param extended_sources: return data around amount itself :param float_digits: round float to N digits, don’t round if None :return: list of amounts
-
split
(text)¶
-
text2num
(s)¶ Convert written amount into integer/float. :param s: written number :param search_fraction: extract fraction :return: integer/float
-
-
lexnlp.extract.de.amounts.
get_amount_list
(*args, **kwargs)¶
-
lexnlp.extract.de.amounts.
get_np
(text) → Generator¶
lexnlp.extract.de.citations module¶
Citation extraction for German.
This module implements citation extraction functionality in German.
- Todo:
- Improved unit tests and case coverage
-
class
lexnlp.extract.de.citations.
DeCitationParser
¶ Bases:
object
-
CITATION_PTN
= '\n (?P<text>\n (?:\n (?:\n (?:\n (?:Artikel\\s(?P<article>\\d+))|\n (?:\\sSatz\\s(?P<sentence>\\d+))|\n (?:\\s(?:Nummer|Nr\\.)\\s(?P<number>(?:\\d+|\\s*und |\\s*bis\\s)+))|\n (?:\\sAbsatz(?:es)?\\s(?P<paragraph>(?:\\d+|\\s*und\\s)+))|\n (?:\\sUnterabsatz(?:es)?\\s(?P<subparagraph>(?:\\d+|\\s*und\\s)+))|\n (?:\\sBuchstabe\\s(?P<letter>(?:\\w|\\s*und\\s)+))\n )*\n (?:\\sdes\\sGesetzes|\\sder\\sVerordnung)\n )?\\s*\n (?:vom|v\\.)\\s(?P<date>\\d{1,2}\\.\\s\\S+\\s\\d{4}),?\\s\n )?\n \\(?BGBl\\.?\\s(?:(?P<year>\\d{4})\\s)?(?P<part>I{1,3})\\sS\\.\\s(?:(?P<page>\\d+)(?:\\s\\((?P<year>\\d{4})\\))?(?:,\\s)?)+\\)?)\n '¶
-
CITATION_PTN_RE
= regex.Regex('\n (?P<text>\n (?:\n (?:\n (?:\n (?:Artikel\\s(?P<article>\\d+))|\n (?:\\sSatz\\s(?P<sentence>\\d+))|\n (?:\\s(?:Nummer|Nr\\.)\\s(?P<number>(?:\\d+|\\s*und |\\s*bis\\s)+))|\n (?:\\sAbsatz(?:es)?\\s(?P<paragraph>(?:\\d+|\\s*und\\s)+))|\n (?:\\sUnterabsatz(?:es)?\\s(?P<subparagraph>(?:\\d+|\\s*und\\s)+))|\n (?:\\sBuchstabe\\s(?P<letter>(?:\\w|\\s*und\\s)+))\n )*\n (?:\\sdes\\sGesetzes|\\sder\\sVerordnung)\n )?\\s*\n (?:vom|v\\.)\\s(?P<date>\\d{1,2}\\.\\s\\S+\\s\\d{4}),?\\s\n )?\n \\(?BGBl\\.?\\s(?:(?P<year>\\d{4})\\s)?(?P<part>I{1,3})\\sS\\.\\s(?:(?P<page>\\d+)(?:\\s\\((?P<year>\\d{4})\\))?(?:,\\s)?)+\\)?)\n ', flags=regex.S | regex.I | regex.M | regex.X | regex.V0)¶
-
CITATION_RANGE_PTN
= '\n (?P<text>BGBl\\.?\\s(?P<part>I{1,3})\\s(?P<year>\\d{4}),\\s(?P<page>\\d+\\s*[—-]\\s*\\d+))\n '¶
-
CITATION_RANGE_PTN_RE
= regex.Regex('\n (?P<text>BGBl\\.?\\s(?P<part>I{1,3})\\s(?P<year>\\d{4}),\\s(?P<page>\\d+\\s*[—-]\\s*\\d+))\n ', flags=regex.S | regex.I | regex.M | regex.X | regex.V0)¶
-
SECOND_CITATION_PTN
= '\n (?P<text>BGBl[IS\\.,\\s\\d]+;\\s(?P<year>\\d{4})\\s(?P<part>I{1,3})\\sS\\.\\s(?:(?P<page>\\d+)(?:,\\s)?)+)\n '¶
-
SECOND_CITATION_PTN_RE
= regex.Regex('\n (?P<text>BGBl[IS\\.,\\s\\d]+;\\s(?P<year>\\d{4})\\s(?P<part>I{1,3})\\sS\\.\\s(?:(?P<page>\\d+)(?:,\\s)?)+)\n ', flags=regex.S | regex.I | regex.M | regex.X | regex.V0)¶
-
classmethod
get_citation_annotations
(text: str) → Generator[[lexnlp.extract.common.annotations.citation_annotation.CitationAnnotation, None], None]¶ Get citations containing “BGBl” :param text: str :return: yields dict
-
re_flags
= 90¶
-
-
lexnlp.extract.de.citations.
get_citation_annotations
(text: str) → Generator[[lexnlp.extract.common.annotations.citation_annotation.CitationAnnotation, None], None]¶
-
lexnlp.extract.de.citations.
get_citation_list
(text)¶
-
lexnlp.extract.de.citations.
get_citations
(text: str)¶ Get citations containing “BGBl” :param text: str :return: yields dict
lexnlp.extract.de.copyrights module¶
-
class
lexnlp.extract.de.copyrights.
CopyrightDeParser
¶ Bases:
lexnlp.extract.common.copyrights.copyright_en_style_parser.CopyrightEnStyleParser
-
copyright_ptn
= '((Copyright\\W\\s*|Urheberrechte\\W\\s*|Urheberschutz\\W\\s*|Eigentumsrecht|\\(\\s*[Cc]\\s*\\)\\s*|©)+\\s*(\\d{4}(?:\\s*[-,–]\\s*\\d{4})?)?\\s*(.+))'¶
-
copyright_ptn_re
= regex.Regex('((Copyright\\W\\s*|Urheberrechte\\W\\s*|Urheberschutz\\W\\s*|Eigentumsrecht|\\(\\s*[Cc]\\s*\\)\\s*|©)+\\s*(\\d{4}(?:\\s*[-,–]\\s*\\d{4})?)?\\s*(.+))', flags=regex.V0)¶
-
copyright_words
= ['Copyright', 'Urheberrechte', 'Urheberschutz', 'Eigentumsrecht']¶
-
copyright_words_ptrn
= 'Copyright\\W\\s*|Urheberrechte\\W\\s*|Urheberschutz\\W\\s*|Eigentumsrecht'¶
-
classmethod
extract_phrases_with_coords
(sentence: str) → List[Tuple[str, int, int]]¶
-
static
init_parser
()¶
-
line_processor
= <lexnlp.utils.lines_processing.line_processor.LineProcessor object>¶
-
-
lexnlp.extract.de.copyrights.
get_copyright_annotations
(text: str, return_sources=False) → Generator[[lexnlp.extract.common.annotations.copyright_annotation.CopyrightAnnotation, None], None]¶
-
lexnlp.extract.de.copyrights.
get_copyright_list
(text: str, return_sources=False) → List[lexnlp.extract.common.annotations.copyright_annotation.CopyrightAnnotation]¶
-
lexnlp.extract.de.copyrights.
get_copyrights
(text: str, return_sources=False) → Generator[[dict, None], None]¶
lexnlp.extract.de.court_citations module¶
-
class
lexnlp.extract.de.court_citations.
CourtCitationsParser
¶ Bases:
object
https://docs.google.com/spreadsheets/d/1_-Hnr46s8JmTYIFSkcI01gbwqwjnVDoAV1dUv3Bz5fM/edit#gid=0
could be one of the following:
(lalala; DATE; vom) or (lalala; DATE; Beschluss)
or § lalala Court Name (abbreviation)
or
-
find_citations_in_embraced_text
(text: str) → None¶
-
get_dates_from_text
(text: str) → List[lexnlp.extract.de.court_citations.PossibleToken]¶
-
get_detail_from_chunk
(chunk_text: str, chunk_start: int) → None¶
-
get_reference_from_registry
(registry: lexnlp.extract.de.court_citations.PossibleToken, chunk_body: str) → str¶
-
get_registries_from_text
(text: str) → List[lexnlp.extract.de.court_citations.PossibleToken]¶
-
parse
(text: str, locale: str = None) → List[lexnlp.extract.common.annotations.court_citation_annotation.CourtCitationAnnotation]¶
-
process_chunks_in_embraced_text
(embraced_text: str, start) → None¶
-
reg_cite_chunk
= regex.Regex('\\([^0-9\\)]+[0-9\\.]{2,}[^\\)]+\\)', flags=regex.V0)¶
-
reg_split_by_registry
= regex.Regex('BStBl|BFH|BFHE|GmS-OGB|BVerwGE|GrS|BFH-Urteile|BFH-Beschlüsse|DstR|KStG', flags=regex.V0)¶
-
reg_token_end
= regex.Regex('[;,]', flags=regex.V0)¶
-
reg_trigger_words
= regex.Regex('Beschluss|vom', flags=regex.I | regex.V0)¶
-
registries
= {'BFH': 'Deutschland, Rechtswesen: Bundesfinanzhof', 'BFH-Beschlüsse': 'Bundesfinanzhof Beschlüsse', 'BFH-Urteile': 'Bundesfinanzhof Urteile', 'BFHE': 'Sammlung der Entscheidungen des BFH', 'BStBl': 'Bundessteuerblatt (sonstige gebräuchliche Verwendung)', 'BVerwGE': 'Entscheidungen des Bundesverwaltungsgerichts', 'DstR': 'Deutsches Steuerrecht - DStR', 'GmS-OGB': 'Beschluss des Gemeinsamen Senats der obersten Gerichtshöfe des Bundes', 'GrS': 'Beschluss des Großen Senats des BFH', 'KStG': 'Körperschaftsteuergesetz'}¶
-
registry_finder
= <lexnlp.utils.lines_processing.phrase_finder.PhraseFinder object>¶
-
split_chunk_and_find_citations
(text: str, start: int) → None¶
-
split_text_by_keywords
(text: str) → List[Tuple[str, int]]¶
-
-
class
lexnlp.extract.de.court_citations.
PossibleToken
(token_type: str, value: str, coords: Tuple[int, int], prob: int)¶ Bases:
object
-
lexnlp.extract.de.court_citations.
get_court_citation_annotations
(text: str, language: str = None) → Generator[[lexnlp.extract.common.annotations.court_citation_annotation.CourtCitationAnnotation, None], None]¶
-
lexnlp.extract.de.court_citations.
get_court_citation_list
(text: str, language: str = None) → List[lexnlp.extract.common.annotations.court_citation_annotation.CourtCitationAnnotation]¶
-
lexnlp.extract.de.court_citations.
get_court_citations
(text: str, language: str = None) → Generator[[dict, None], None]¶
lexnlp.extract.de.courts module¶
-
lexnlp.extract.de.courts.
get_court_annotations
(text: str, language: str = None) → Generator[[lexnlp.extract.common.annotations.court_annotation.CourtAnnotation, None], None]¶
-
lexnlp.extract.de.courts.
get_court_list
(text: str, language=None) → List[lexnlp.extract.common.annotations.court_annotation.CourtAnnotation]¶
-
lexnlp.extract.de.courts.
get_courts
(text: str, language=None) → Generator[[dict, None], None]¶
-
lexnlp.extract.de.courts.
setup_de_parser
()¶
lexnlp.extract.de.dates module¶
lexnlp.extract.de.definitions module¶
-
class
lexnlp.extract.de.definitions.
DeutscheParsingMethods
¶ Bases:
object
- the class contains methods with the same signature:
- def method_name(phrase: str) -> List[DefinitionMatch]:
the methods are used for finding definition “candidates”
-
articles_ptrn
= '\\sder|\\sdie|\\sdas|\\sdes|\\sdem|\\sden|\\sein|\\seine|\\seines|\\seiner|\\seinem|\\seinen|\\sjede'¶
-
ist_break_words
= ['der', 'die', 'das', 'des', 'dem', 'den', 'ein', 'eine', 'eines', 'einer', 'einem', 'einen', 'jede']¶
-
ist_sind
= ['ist', 'sind']¶
-
static
match_im_sinne
(phrase: str) → List[lexnlp.extract.common.pattern_found.PatternFound]¶ Parameters: phrase – Vermögensgegenstände im Sinne dieses Gesetzes sind unbewegliches Vermögen im Sinne des Absatzes 8, ferner zu dessen Bewirtschaftung; Returns: {name: ‘Vermögensgegenstände’, probability: 100, …}
-
static
match_ist_jeder
(phrase: str) → List[lexnlp.extract.common.pattern_found.PatternFound]¶ Parameters: phrase – ist Diensteanbieter jeder natürliche oder juristische Person, die eigene oder fremde Telemedien zur Nutzung bereithält oder den Zugang zur Nutzung vermittelt; Returns: {name: ‘Diensteanbieter’, probability: 100, …}
-
reg_im_sinne
= re.compile('(.+(?=im Sinne.+[\\s\\b]sind[\\s\\b]))|(.+(?=im Sinne.+[\\s\\b]ist[\\s\\b]))', re.IGNORECASE)¶
-
reg_ist_jeder
= [re.compile('(?<=\\bist\\s).+?(?=\\s\\sder|\\sdie|\\sdas|\\sdes|\\sdem|\\sden|\\sein|\\seine|\\seines|\\seiner|\\seinem|\\seinen|\\sjede|,|;|$)', re.IGNORECASE), re.compile('(?<=\\bsind\\s).+?(?=\\s\\sder|\\sdie|\\sdas|\\sdes|\\sdem|\\sden|\\sein|\\seine|\\seines|\\seiner|\\seinem|\\seinen|\\sjede|,|;|$)', re.IGNORECASE)]¶
-
sw
= 'sind'¶
-
lexnlp.extract.de.definitions.
get_definition_annotations
(text: str, language=None) → Generator[[lexnlp.extract.common.annotations.definition_annotation.DefinitionAnnotation, None], None]¶
-
lexnlp.extract.de.definitions.
get_definition_list
(text: str, language=None) → List[lexnlp.extract.common.annotations.definition_annotation.DefinitionAnnotation]¶
-
lexnlp.extract.de.definitions.
get_definitions
(text: str, language=None) → Generator[[dict, None], None]¶
-
lexnlp.extract.de.definitions.
make_de_definitions_parser
()¶
lexnlp.extract.de.durations module¶
-
class
lexnlp.extract.de.durations.
DeDurationParser
¶ Bases:
lexnlp.extract.common.durations.durations_parser.DurationParser
-
DURATION_MAP
= {'anniversaries': 365, 'anniversary': 365, 'annum': 365, 'day': 1, 'hour': 0.041666666666666664, 'minute': 0.0006944444444444445, 'month': 30, 'quarter': 91.25, 'second': 1.1574074074074073e-05, 'week': 7, 'year': 365}¶
-
DURATION_MAP_RE
= regex.Regex('vierteljahre|vierteljahr|sekunden|sekunde|minuten|stunden|minute|stunde|wochen|monate|jahres|jahren|woche|monat|jahre|tage|jahr|tag', flags=regex.V0)¶
-
DURATION_PTN
= '\n (?P<text>(?P<num_text>\n (?:\n (?:[\\.\\d][\\d\\.,]*\\s+|\\W|^)\n (?:(?:(?:in)?viertel|halbe|milliardenste|millionenste|milliardste|dreizehnte|vierzehnte|fünfzehnte|sechzehnte|siebzehnte|achtzehnte|neunzehnte|zwanzigste|dreißigste|vierzigste|fünfzigste|sechzigste|siebzigste|achtzigste|neunzigste|hundertste|tausendste|millionste|billionste|milliarden|milliarde|millionen|dreizehn|vierzehn|fünfzehn|sechzehn|siebzehn|achtzehn|neunzehn|sechste|zwölfte|zwanzig|dreißig|vierzig|fünfzig|sechzig|siebzig|achtzig|neunzig|hundert|tausend|million|billion|einhalb|nullte|zweite|dritte|vierte|fünfte|siebte|neunte|zehnte|sieben|erste|achte|elfte|sechs|zwölf|einen|null|eins|zwei|drei|vier|fünf|acht|neun|zehn|eine|elf|ein|und)\\s?)+(?:\\W|$)|\n (?:[\\.\\d][\\d\\.,\\s]*)\n )\n )?\n (?P<unit_prefix>(?:kalend[ae]r|lebens|actual))?\n (?P<unit_name>vierteljahre|vierteljahr|sekunden|sekunde|minuten|stunden|minute|stunde|wochen|monate|jahres|jahren|woche|monat|jahre|tage|jahr|tag))\n (?:\\W|$)\n '¶
-
DURATION_PTN_RE
= regex.Regex('\n (?P<text>(?P<num_text>\n (?:\n (?:[\\.\\d][\\d\\.,]*\\s+|\\W|^)\n (?:(?:(?:in)?viertel|halbe|milliardenste|millionenste|milliardste|dreizehnte|vierzehnte|fünfzehnte|sechzehnte|siebzehnte|achtzehnte|neunzehnte|zwanzigste|dreißigste|vierzigste|fünfzigste|sechzigste|siebzigste|achtzigste|neunzigste|hundertste|tausendste|millionste|billionste|milliarden|milliarde|millionen|dreizehn|vierzehn|fünfzehn|sechzehn|siebzehn|achtzehn|neunzehn|sechste|zwölfte|zwanzig|dreißig|vierzig|fünfzig|sechzig|siebzig|achtzig|neunzig|hundert|tausend|million|billion|einhalb|nullte|zweite|dritte|vierte|fünfte|siebte|neunte|zehnte|sieben|erste|achte|elfte|sechs|zwölf|einen|null|eins|zwei|drei|vier|fünf|acht|neun|zehn|eine|elf|ein|und)\\s?)+(?:\\W|$)|\n (?:[\\.\\d][\\d\\.,\\s]*)\n )\n )?\n (?P<unit_prefix>(?:kalend[ae]r|lebens|actual))?\n (?P<unit_name>vierteljahre|vierteljahr|sekunden|sekunde|minuten|stunden|minute|stunde|wochen|monate|jahres|jahren|woche|monat|jahre|tage|jahr|tag))\n (?:\\W|$)\n ', flags=regex.S | regex.I | regex.M | regex.X | regex.V0)¶
-
DURATION_TRANSLATION_MAP
= {'jahr': 'year', 'jahre': 'year', 'jahren': 'year', 'jahres': 'year', 'minute': 'minute', 'minuten': 'minute', 'monat': 'month', 'monate': 'month', 'sekunde': 'second', 'sekunden': 'second', 'stunde': 'hour', 'stunden': 'hour', 'tag': 'day', 'tage': 'day', 'vierteljahr': 'quarter', 'vierteljahre': 'quarter', 'woche': 'week', 'wochen': 'week'}¶
-
INNER_CONJUNCTIONS
= ['und', 'plus']¶
-
INNER_PUNCTUATION
= regex.Regex('[\\s\\,]', flags=regex.V0)¶
-
LOCALE
= 'de'¶
-
duration_items
= ['vierteljahre', 'vierteljahr', 'sekunden', 'sekunde', 'minuten', 'stunden', 'minute', 'stunde', 'wochen', 'monate', 'jahres', 'jahren', 'woche', 'monat', 'jahre', 'tage', 'jahr', 'tag']¶
-
duration_items_joined
= 'vierteljahre|vierteljahr|sekunden|sekunde|minuten|stunden|minute|stunde|wochen|monate|jahres|jahren|woche|monat|jahre|tage|jahr|tag'¶
-
classmethod
get_all_annotations
(text: str, float_digits=4) → List[lexnlp.extract.common.annotations.duration_annotation.DurationAnnotation]¶
-
-
lexnlp.extract.de.durations.
get_duration_annotations
(text: str, float_digits=4) → Generator[[lexnlp.extract.common.annotations.duration_annotation.DurationAnnotation, None], None]¶
-
lexnlp.extract.de.durations.
get_duration_annotations_list
(text: str, float_digits=4) → List[lexnlp.extract.common.annotations.duration_annotation.DurationAnnotation]¶
-
lexnlp.extract.de.durations.
get_duration_list
(text: str, float_digits=4)¶
-
lexnlp.extract.de.durations.
get_durations
(text: str, float_digits=4) → Generator¶
lexnlp.extract.de.geoentities module¶
-
class
lexnlp.extract.de.geoentities.
DeGeoentitiesParser
¶ Bases:
object
-
default_annotation_columns
= [Entity ID (Entity ID): entity_id, Entity Category (Entity Category): entity_category, (source): source, German Name (German Name): name, Entity Name (Entity Name): name_en, Entity Priority (Entity Priority): entity_priority, ISO-3166-2 (ISO-3166-2): iso_3166_2, ISO-3166-3 (ISO-3166-3): iso_3166_3, Alias (Alias): alias]¶
-
default_selecting_columns
= ['German Name', 'ISO-3166-2', 'ISO-3166-3', 'Alias']¶
-
get_geoentities
(text: str, config: pandas.core.frame.DataFrame, parse_columns: Union[List[str], Tuple[str]] = None, result_columns: Optional[dict] = None, preformed_entity: Optional[dict] = None, priority_sort_column: Optional[str] = None, priority_sort_ascending: bool = True, cell_values_separator: Optional[str] = ';', unique_column_values: bool = True) → Generator¶
-
get_geoentity_annotations
(text: str, config: pandas.core.frame.DataFrame, parse_columns: Union[List[str], Tuple[str]] = None, result_columns: List[lexnlp.extract.de.geoentities.DeGeoentityColumn] = None, preformed_entity: Optional[dict] = None, priority_sort_column: Optional[str] = None, priority_sort_ascending: bool = True, cell_values_separator: Optional[str] = ';', unique_column_values: bool = True) → Generator[[lexnlp.extract.common.annotations.geo_annotation.GeoAnnotation, None], None]¶
-
-
class
lexnlp.extract.de.geoentities.
DeGeoentityColumn
(dataframe_col_name: str, resulted_name: str, attr_name: str)¶ Bases:
object
dataframe_col_name: column in the source Pandas dataframe resulted_name: column in resulted set, produced by DataframeEntityParser attr_name: GeoAnnotation property name
-
lexnlp.extract.de.geoentities.
get_geoentity_annotations
(text: str, config: pandas.core.frame.DataFrame, parse_columns: Union[List[str], Tuple[str]] = None, result_columns: Optional[dict] = None, preformed_entity: Optional[dict] = None, priority_sort_column: Optional[str] = None, priority_sort_ascending: bool = True, cell_values_separator: Optional[str] = ';', unique_column_values: bool = True) → Generator[[lexnlp.extract.common.annotations.geo_annotation.GeoAnnotation, None], None]¶
lexnlp.extract.de.language_tokens module¶
-
class
lexnlp.extract.de.language_tokens.
DeLanguageTokens
¶ Bases:
object
-
abbreviations
= {'A.Ch.', 'Abb.', 'Abf.', 'Abg.', 'Abh.', 'Abk.', 'Abs.', 'Abschn.', 'Abt.', 'Akk.', 'Anh.', 'Ank.', 'Anm.', 'Antw.', 'Anw.', 'Anz.', 'Aufl.', 'Bauj.', 'Bd./Bde.', 'Bed.', 'Ber.', 'Betr.', 'Bez.', 'Bhf.', 'Bl.', 'Bln.', 'Br.', 'Chr.', 'Dat.', 'Dipl.', 'Dipl.-Chem.', 'Dipl.-Ing.', 'Dipl.-Kfm.', 'Dir.', 'Do.', 'Doz.', 'Dr.', 'Dr.-Ing.', 'Dr.h.c.', 'Dr.jur.', 'Dr.med.', 'Dr.phil.', 'Dr.rer.nat.', 'Dr.theol.', 'Erdg.', 'Eßl.', 'Fa.', 'Fak.', 'Fam.', 'Fdw.', 'Ff.', 'Fil.', 'Fr.', 'Frfr.', 'Frhr.', 'Frl.', 'Gebr.', 'Gem.', 'Gen.', 'Hbf.', 'Hl. or hl.', 'Hptst.', 'Hr.', 'Hreg.', 'Inc.', 'Ind.', 'Ing.', 'Inh.', 'Insp.', 'Inst.', 'Jg.', 'Jh.', 'Kfm.', 'Kl.', 'Kpt.', 'Kr.', 'Kt.', 'Ldkr.', 'Lekt.', 'Lfrg.', 'Lit.', 'Lt.', 'Mag.', 'Mill.', 'Min.', 'Mrd.', 'Mz.', 'N.N.', 'Nachf.', 'Nr.', 'Obb.', 'P.', 'Part.', 'Pkt.', 'Pl.', 'Postf.', 'Prof.', 'Prov.', 'Quitt.', 'Red.', 'Reg.', 'Reg.Bez.', 'Rep.', 'Rgt.', 'Rhld.', 'Rzpt.', 'S.', 'Sa.', 'Sekr.', 'Sem.', 'Sen.', 'St.', 'Std.', 'Str.', 'Tab.', 'Tb.', 'Teilh.', 'Tel.', 'Tnd.', 'U/min.', 'Univ.', 'V.', 'Verf. or Vf.', 'Verl.', 'Verm.', 'Vollm.', 'Vors.', 'Wb.', 'Whg.', 'Wkst.', 'Wwe.', 'Wwr.', 'Wz.', 'Z.', 'Ziff.', 'Ztg.', 'Zub.', 'a.A.', 'a.D.', 'a.M.', 'a.d.', 'a.o.Prof.', 'abds.', 'abs.', 'abw.', 'act.', 'akad.', 'allg.', 'aussch.', 'b.w.', 'begl.', 'beil.', 'beisp.', 'bes.', 'betr.', 'bez.', 'bz.', 'bzgl./bez.', 'bzw.', 'cal.', 'cand.', 'd. Gr.', 'd.M.', 'd.h.', 'dag.', 'dam.', 'dazw.', 'desgl.', 'dgl.', 'do.', 'dt.', 'dz.', 'ehem.', 'eigtl.', 'entspr.', 'entw.', 'etw.', 'ev.', 'exkl.', 'f.', 'f./ ff.', 'fr.', 'geb.', 'gegr.', 'gem.', 'gen.', 'ges.gesch.', 'gesch.', 'geschl.', 'geschr.', 'gest.', 'gez.', 'gzj.', 'ha.', 'habil.', 'hdt.', 'herg.', 'hj.', 'höfl.', 'i.', 'i.A.', 'i.D.', 'i.J.', 'i.R.', 'i.allg.', 'iV.', 'iZm.', 'ill.', 'in B.', 'inbegr.', 'inc.', 'inkl.', 'int.', 'inzw.', 'jew.', 'jun.', 'jur.', 'k.u.k.', 'kath.', 'kg.', 'kgl.', 'km.', 'kn.', 'kompl.', 'led.', 'lfd.', 'lt.', 'luth.', 'm.M / m.M.n.', 'm.W.', 'm.a.W.', 'ma.', 'mdal.', 'mech.', 'med.', 'mehrf.', 'mtl.', 'möbl.', 'n.Chr.', 'n.J.', 'n.M.', 'nachm.', 'nat.', 'no.', 'nr.', 'o.', 'o./ od.', 'o.A.', 'o.B.', 'o.J.', 'o.Pr.', 'o.V.', 'o.a.', 'o.ä.', 'p.', 'p.A.', 'pat.', 'pharm.', 'pol.', 'priv.', 'prot.', 'r.', 'rd.', 'resp.', 'rk.', 'rm.', 's.', 's.Br.', 's.g.e.', 's.o./s.u.', 's.u.', 'sek.', 'sel.', 'sen.', 'sfr.', 'sm.', 'sog./s.g.', 'soz.', 'spez.', 'staatl-gepr.', 'stdl.', 'stellv.', 'städt.', 'svw.', 'tägl.', 'u.', 'u.A.w.g.', 'u.E.', 'u.U.', 'u.W.', 'u.a.', 'u.d.M.', 'u.dsgl.', 'u.v.a.', 'u.zw.', 'u.ä.', 'u.ü.V.', 'ue.', 'unverk.', 'urspr.', 'usw.', 'v.', 'v.A.w.', 'v.Chr.', 'v.D.', 'v.H.', 'v.J.', 'v.M.', 'v.T.', 'v.a.', 'v.g.u.', 'v.l.n.r.', 'v.o.', 'v.r.n.l.', 'var.', 'verb.', 'verh.', 'versch.', 'verst.', 'vgl.', 'vollst.', 'vorl.', 'vorm.', 'w.L.', 'w.o.', 'z.', 'z.A.', 'z.B.', 'z.H.', 'z.K.', 'z.S.', 'z.T.', 'z.V.', 'z.Z.', 'z.d.A.', 'z.w.V.', 'zgl.', 'zuf.', 'zus.', 'zw.', 'zzgl.', 'Übers.', 'örtl.', 'übl./üblw.'}¶
-
articles
= ['der', 'die', 'das', 'des', 'dem', 'den', 'ein', 'eine', 'eines', 'einer', 'einem', 'einen']¶
-
conjunctions
= ['und', 'oder']¶
-
static
init
()¶
-
lexnlp.extract.de.laws module¶
-
class
lexnlp.extract.de.laws.
LawsParser
(gesetze_df: pandas.core.frame.DataFrame, verordnungen_df: pandas.core.frame.DataFrame, concept_df: pandas.core.frame.DataFrame)¶ Bases:
object
-
parse
(text: str, locale: str = None) → List[lexnlp.extract.common.annotations.law_annotation.LawAnnotation]¶
-
-
lexnlp.extract.de.laws.
get_law_annotations
(text: str, language: str = None) → Generator[[lexnlp.extract.common.annotations.law_annotation.LawAnnotation, None], None]¶
-
lexnlp.extract.de.laws.
get_law_list
(text: str, language: str = None) → List[lexnlp.extract.common.annotations.law_annotation.LawAnnotation]¶
-
lexnlp.extract.de.laws.
get_laws
(text: str, language: str = None) → Generator[[dict, None], None]¶
-
lexnlp.extract.de.laws.
initialize_parser
(gesetze_df: pandas.core.frame.DataFrame, verordnungen_df: pandas.core.frame.DataFrame, concept_df: pandas.core.frame.DataFrame) → lexnlp.extract.de.laws.LawsParser¶
lexnlp.extract.de.percents module¶
-
lexnlp.extract.de.percents.
get_percent_annotations
(text: str, float_digits=4) → Generator[[lexnlp.extract.common.annotations.percent_annotation.PercentAnnotation, None], None]¶ Get percent usages within text. :param text: :param return_sources: :param float_digits: :return:
-
lexnlp.extract.de.percents.
get_percent_list
(*args, **kwargs)¶
-
lexnlp.extract.de.percents.
get_percents
(text: str, float_digits=4) → Generator¶ Get percent usages within text. :param text: :param return_sources: :param float_digits: :return: