def test_concordance_simple_nocontext(germaparl): corpus = get_corpus(germaparl) df_dump = corpus.query('[lemma="gehen"]', context=None).df concordance = Concordance(corpus, df_dump) lines = concordance.simple(df_dump, p_show=['word']) assert (len(lines) == len(df_dump)) assert (all(col in lines.columns for col in ['word']))
def test_concordance_simple(germaparl): corpus = get_corpus(germaparl) df_dump = corpus.query('"CSU"').df concordance = Concordance(corpus, df_dump) lines = concordance.simple(df_dump, p_show=['word', 'lemma']) assert (len(lines) == len(df_dump)) assert (all(col in lines.columns for col in ['word', 'lemma']))