|
24 | 24 |
|
25 | 25 | package org.archive.webservices.archivespark.functions
|
26 | 26 |
|
27 |
| -import java.util.Properties |
28 |
| -import edu.stanford.nlp.ling.CoreAnnotations.{NamedEntityTagAnnotation, SentencesAnnotation, TextAnnotation, TokensAnnotation} |
29 |
| -import edu.stanford.nlp.ling.CoreLabel |
30 |
| -import edu.stanford.nlp.pipeline.{Annotation, CoreDocument, StanfordCoreNLP} |
31 |
| -import edu.stanford.nlp.util.CoreMap |
| 27 | +import edu.stanford.nlp.pipeline.{CoreDocument, StanfordCoreNLP} |
32 | 28 | import org.archive.webservices.archivespark.model._
|
33 | 29 | import org.archive.webservices.archivespark.model.dataloads.ByteLoad
|
34 | 30 | import org.archive.webservices.archivespark.model.pointers.DependentFieldPointer
|
35 | 31 | import org.archive.webservices.sparkling.ars.WANE
|
36 | 32 |
|
| 33 | +import java.util.Properties |
37 | 34 | import scala.collection.JavaConverters._
|
38 |
| -import scala.collection.mutable |
39 | 35 |
|
40 | 36 | object EntitiesNamespace {
|
41 | 37 | def get: DependentFieldPointer[ByteLoad.Root, String] = HtmlText.mapIdentity("entities").get[String]("entities")
|
@@ -66,7 +62,9 @@ class Entities private (properties: Properties, tagFieldMapping: Seq[(String, St
|
66 | 62 | case _: Exception => Map.empty[String, Set[String]]
|
67 | 63 | }
|
68 | 64 |
|
69 |
| - for ((tag, _) <- tagFieldMapping) derivatives.setNext(MultiValueEnrichable(mentions.getOrElse(tag, Set.empty).toSeq)) |
| 65 | + for ((tag, _) <- tagFieldMapping) { |
| 66 | + derivatives.setNext(MultiValueEnrichable(mentions.getOrElse(tag, Set.empty).toSeq)) |
| 67 | + } |
70 | 68 | }
|
71 | 69 | }
|
72 | 70 |
|
|
0 commit comments