我已经完成了词性标注。但是如何进行依存句法分析呢?我能在R语言中获取相关的代码吗?
回答:
你可能已经找到了答案。如果还没有,以下是我在R语言中进行依存句法分析的方法:
library(cleanNLP)library(udpipe)s <- "I prefer the morning flight through Denver"cnlp_init_udpipe()doc <- cnlp_annotate(s, as_strings = TRUE)cnlp_get_dependency(doc, get_token = FALSE)