I am trying to determine the subject in a German sentence. For English I used to do:
import spacy
nlp = spacy.load('en')
sent = "I shot an elephant"
doc=nlp(sent)
sub_toks = [tok for tok in doc if (tok.dep_ == "nsubj") ]
print(sub_toks)
But it doesn't work for nlp = spacy.load('de_core_news_sm') and using a German sentence. It returns an empty list.
I tried looking here, even if they have parts of speech instead of subject, object etc. But it returns empty lists too. Is this even possible in German?