Open Querela opened 1 year ago
Hi @Querela ,
thanks for your questions and recommendations .
pattern_builder
shown in img_1.png
does not reflect the current API. What exactly does not fit in your opinion? I tried to find any error on my end, but in my demo it still works like it is described . You might want to test it again. If you have any other issues let me know!
Best regards Chris
Hi, this seems like a very interesting project. Unfortunately, I can't seem to get any results. I'm a bit unsure why and how to solve this.
img_1.png
does not really reflect the current API.img_4.png
and the included exampleexample.py
also do not produce any output.spacy
andpandas
are missing. I suggest, including them into thesetup.py
. E.g. like this.python -m spacy download de_core_news_lg
?)I tried with both
patterns_small.jsonl
andpatterns_large.jsonl
. And a few different inputs...some tests
I just extended the `example.py` file: ```python # ... for sent in doc.sents: print(f"In: {sent}") widths = [max(6, len(word.text)) for word in sent] fmt = lambda x: f"{x[0]:{x[1]}}" fmtit = lambda x: map(fmt, zip(x, widths)) print("Text:", " ".join(fmtit(map(str, (word.text for word in sent))))) print("pos_:", " ".join(fmtit(map(str, (word.pos_ for word in sent))))) print("tag_:", " ".join(fmtit(map(str, (word.tag_ for word in sent))))) print("dep_:", " ".join(fmtit(map(str, (word.dep_ for word in sent))))) print("part:", " ".join(fmtit(map(str, (word._.part for word in sent))))) print("posi:", " ".join(fmtit(map(str, (word._.posi for word in sent))))) # ... ``` ``` In: Nürnberg ist eine Stadt in Deutschland. Text: Nürnberg ist eine Stadt in Deutschland . pos_: PROPN AUX DET NOUN ADP PROPN PUNCT tag_: NE VAFIN ART NN APPR NE $. dep_: sb ROOT nk pd mnr nk punct part: subj pred obj obj pred subj None posi: 1 0 0 2 0 0 None # no triples ``` ``` In: Rosa Kempf schloss 1911 ihr Studium mit der Promotion ab Text: Rosa Kempf schloss 1911 ihr Studium mit der Promotion ab pos_: PROPN PROPN VERB NUM DET NOUN ADP DET NOUN ADP tag_: NE NE VVFIN CARD PPOSAT NN APPR ART NN PTKVZ dep_: pnc sb ROOT mo nk oa mnr nk nk svp part: subj subj pred None None obj None None None None posi: 0 6 0 None None 1 None None None None # no triples ```