from transformers import AutoTokenizer, AutoModelForTokenClassification
from transformers import pipeline
tokenizer = AutoTokenizer.from_pretrained("danielsteinigen/KeyFiTax")
model = AutoModelForTokenClassification.from_pretrained("danielsteinigen/KeyFiTax")
nlp = pipeline("ner", model=model, tokenizer=tokenizer)
key_figures = "[GRP-01]EStG § 66 Höhe des Kindergeldes, Zahlungszeitraum (1) Das Kindergeld beträgt monatlich für das erste und zweite Kind jeweils 219 Euro, für das dritte Kind 225 Euro und für das vierte und jedes weitere Kind jeweils 250 Euro."
conditions = "[GRP-00]EStG § 66 Höhe des Kindergeldes, Zahlungszeitraum (1) Das Kindergeld beträgt monatlich für das erste und zweite Kind jeweils 219 Euro, für das dritte Kind 225 Euro und für das vierte und jedes weitere Kind jeweils 250 Euro."
relations_1 = "[REL]EStG § 66 Höhe des Kindergeldes, Zahlungszeitraum (1) Das [SUB][ENT-01]Kindergeld[/ENT-01][/SUB] beträgt [OBJ][ENT-07]monatlich[/ENT-07][/OBJ] [OBJ][ENT-02]für das erste und zweite Kind[/ENT-02][/OBJ] [OBJ][ENT-07]jeweils[/ENT-07][/OBJ] [OBJ][ENT-03]219[/ENT-03][/OBJ] [OBJ][ENT-04]Euro[/ENT-04][/OBJ], [OBJ][ENT-02]für das dritte Kind[/ENT-02][/OBJ] [OBJ][ENT-03]225[/ENT-03][/OBJ] [OBJ][ENT-04]Euro[/ENT-04][/OBJ] und [OBJ][ENT-02]für das vierte und jedes weitere Kind[/ENT-02][/OBJ] [OBJ][ENT-07]jeweils[/ENT-07][/OBJ] [OBJ][ENT-03]250[/ENT-03][/OBJ] [OBJ][ENT-04]Euro[/ENT-04][/OBJ]."
relations_2 = "[REL]EStG § 66 Höhe des Kindergeldes, Zahlungszeitraum (1) Das [OBJ][ENT-01]Kindergeld[/ENT-01][/OBJ] beträgt [OBJ][ENT-07]monatlich[/ENT-07][/OBJ] [OBJ][ENT-02]für das erste und zweite Kind[/ENT-02][/OBJ] [OBJ][ENT-07]jeweils[/ENT-07][/OBJ] [SUB][ENT-03]219[/ENT-03][/SUB] [OBJ][ENT-04]Euro[/ENT-04][/OBJ], [OBJ][ENT-02]für das dritte Kind[/ENT-02][/OBJ] [OBJ][ENT-03]225[/ENT-03][/OBJ] [OBJ][ENT-04]Euro[/ENT-04][/OBJ] und [OBJ][ENT-02]für das vierte und jedes weitere Kind[/ENT-02][/OBJ] [OBJ][ENT-07]jeweils[/ENT-07][/OBJ] [OBJ][ENT-03]250[/ENT-03][/OBJ] [OBJ][ENT-04]Euro[/ENT-04][/OBJ]."
relations_3 = "[REL]EStG § 66 Höhe des Kindergeldes, Zahlungszeitraum (1) Das [OBJ][ENT-01]Kindergeld[/ENT-01][/OBJ] beträgt [OBJ][ENT-07]monatlich[/ENT-07][/OBJ] [OBJ][ENT-02]für das erste und zweite Kind[/ENT-02][/OBJ] [OBJ][ENT-07]jeweils[/ENT-07][/OBJ] [OBJ][ENT-03]219[/ENT-03][/OBJ] [OBJ][ENT-04]Euro[/ENT-04][/OBJ], [OBJ][ENT-02]für das dritte Kind[/ENT-02][/OBJ] [SUB][ENT-03]225[/ENT-03][/SUB] [OBJ][ENT-04]Euro[/ENT-04][/OBJ] und [OBJ][ENT-02]für das vierte und jedes weitere Kind[/ENT-02][/OBJ] [OBJ][ENT-07]jeweils[/ENT-07][/OBJ] [OBJ][ENT-03]250[/ENT-03][/OBJ] [OBJ][ENT-04]Euro[/ENT-04][/OBJ]."
relations_4 = "[REL]EStG § 66 Höhe des Kindergeldes, Zahlungszeitraum (1) Das [OBJ][ENT-01]Kindergeld[/ENT-01][/OBJ] beträgt [OBJ][ENT-07]monatlich[/ENT-07][/OBJ] [OBJ][ENT-02]für das erste und zweite Kind[/ENT-02][/OBJ] [OBJ][ENT-07]jeweils[/ENT-07][/OBJ] [OBJ][ENT-03]219[/ENT-03][/OBJ] [OBJ][ENT-04]Euro[/ENT-04][/OBJ], [OBJ][ENT-02]für das dritte Kind[/ENT-02][/OBJ] [OBJ][ENT-03]225[/ENT-03][/OBJ] [OBJ][ENT-04]Euro[/ENT-04][/OBJ] und [OBJ][ENT-02]für das vierte und jedes weitere Kind[/ENT-02][/OBJ] [OBJ][ENT-07]jeweils[/ENT-07][/OBJ] [SUB][ENT-03]250[/ENT-03][/SUB] [OBJ][ENT-04]Euro[/ENT-04][/OBJ]."
results_key_figures = nlp(key_figures)
results_conditions = nlp(conditions)
results_relations_1 = nlp(relations_1)
results_relations_2 = nlp(relations_2)
results_relations_3 = nlp(relations_3)
results_relations_4 = nlp(relations_4)
print(results_key_figures)
print(results_conditions)
print(results_relations_1)
print(results_relations_2)
print(results_relations_3)
print(results_relations_4)
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
Use the code below to get started with the model.
[More Information Needed]
[More Information Needed]
[More Information Needed]
Factors[More Information Needed]
Metrics[More Information Needed]
[More Information Needed]
SummaryBibTeX:
[More Information Needed]
APA:
[More Information Needed]
[More Information Needed]