我在java中实现spark-corenlp时遇到困难。我无法弄清楚java中下面的scala代码的步骤。 spark-corenlp git
scala示例:
function waitForMapLoaded() {
if(!map.loaded()) {
window.setTimeout(waitForMapLoaded, 100);
} else {
loadData();
}
}
waitForMapLoaded();
Java:
val input = Seq(
(1, "<xml>Stanford University is located in California. It is a great university.</xml>")
).toDF("id", "text")
val output = input
.select(cleanxml('text).as('doc))
.select(explode(ssplit('doc)).as('sen))
.select('sen, tokenize('sen).as('words), ner('sen).as('nerTags), sentiment('sen).as('sentiment))
感谢您的帮助。