I get a NullException error for using "java.util.ArrayList". I have also tried "java.util.AbstractSet" and "java.util.AbstractCollection" but got the same error. This is my attempt:
var dependencyGraphAnnotation = new SemanticGraphCoreAnnotations.BasicDependenciesAnnotation().getClass();
var dependencies = sentence.get(dependencyGraphAnnotation);
foreach (var dependency in dependencies java.util.ArrayList) // I get NullExceptionError here
{
Console.WriteLine(dependency);
// Console.WriteLine(dependency.value());
// Console.WriteLine(dependency.label());
if (dependency.ToString().Equals("nsubj"))
{
Console.WriteLine(" hello world ");
}
}
I get a NullException error for using "java.util.ArrayList". I have also tried "java.util.AbstractSet" and "java.util.AbstractCollection" but got the same error. This is my attempt: