@Test public void spansToStringArray1DTest(){ String[] spanString1D = simpleRESTEncoder.spansToStringArray1D(dummySpan1D.stream()); for(String spanString: spanString1D){ assertThat(spanString, equalTo(DummySpan.TEXT)); } }
public <S extends Span> String[] spansToStringArray1D(Stream<S> spans){ return spansToStringArray1D(spans, Span::getText); }
SimpleRESTEncoder extends AbstractRESTEncoder { public <S extends Span> String[] spansToStringArray1D(Stream<S> spans){ return spansToStringArray1D(spans, Span::getText); } }
SimpleRESTEncoder extends AbstractRESTEncoder { public <S extends Span> String[] spansToStringArray1D(Stream<S> spans){ return spansToStringArray1D(spans, Span::getText); } protected  SimpleRESTEncoder(String id);  SimpleRESTEncoder(String id, RESTAdapter restAdapter, Class<? extends Span> elementClass);  SimpleRESTEncoder(String id, RESTAdapter restAdapter, String vectorIdentifier, Class<? extends Span> elementClass); }
SimpleRESTEncoder extends AbstractRESTEncoder { public <S extends Span> String[] spansToStringArray1D(Stream<S> spans){ return spansToStringArray1D(spans, Span::getText); } protected  SimpleRESTEncoder(String id);  SimpleRESTEncoder(String id, RESTAdapter restAdapter, Class<? extends Span> elementClass);  SimpleRESTEncoder(String id, RESTAdapter restAdapter, String vectorIdentifier, Class<? extends Span> elementClass); @Override INDArray encode(String word); abstract INDArray encodeImpl(String word); @Override INDArray encode(Span span); abstract INDArray encodeImpl(Span span); @Override void encodeEach(Sentence input, Class<? extends Span> elementClass); abstract void encodeEachImpl(Sentence input); @Override void encodeEach(Document input, Class<? extends Span> elementClass); abstract void encodeEachImpl(Document input); @Override void encodeEach(Collection<Document> docs, Class<? extends Span> elementClass); abstract void encodeEachImpl(Collection<Document> docs); INDArray encodeValue(String value); List<List<Token>> getTokensOfSentencesOfDocument(Document document); Stream<Stream<Token>> streamTokensOfSentencesOfDocument(Document document); Stream<Stream<S>> streamSpans2D(List<? extends List<S>> spans2D); void encodeEach(S span); void encodeEach(S span, Function<S, String> getText); void encodeEach1D(List<S> spans); void encodeEach1D(List<S> spans, Function<S, String> getText); void encodeEach2D(List<? extends List<S>> spans); void encodeEach2D(List<? extends List<S>> spans, Function<S, String> getText); String[] spansToStringArray1D(Stream<S> spans); String[] spansToStringArray1D(Stream<S> spans, Function<S, String> getText); String[][] spansToStringArray2D(Stream<? extends Stream<S>> spans); String[][] spansToStringArray2D(Stream<? extends Stream<S>> spans, Function<S, String> getText); void putVectorInSpan(S span, double[] data); void putVectorInSpans(Stream<S> spans, double[][] data); void putVectorInSpans(Stream<? extends Stream<S>> spans, double[][][] data); }
SimpleRESTEncoder extends AbstractRESTEncoder { public <S extends Span> String[] spansToStringArray1D(Stream<S> spans){ return spansToStringArray1D(spans, Span::getText); } protected  SimpleRESTEncoder(String id);  SimpleRESTEncoder(String id, RESTAdapter restAdapter, Class<? extends Span> elementClass);  SimpleRESTEncoder(String id, RESTAdapter restAdapter, String vectorIdentifier, Class<? extends Span> elementClass); @Override INDArray encode(String word); abstract INDArray encodeImpl(String word); @Override INDArray encode(Span span); abstract INDArray encodeImpl(Span span); @Override void encodeEach(Sentence input, Class<? extends Span> elementClass); abstract void encodeEachImpl(Sentence input); @Override void encodeEach(Document input, Class<? extends Span> elementClass); abstract void encodeEachImpl(Document input); @Override void encodeEach(Collection<Document> docs, Class<? extends Span> elementClass); abstract void encodeEachImpl(Collection<Document> docs); INDArray encodeValue(String value); List<List<Token>> getTokensOfSentencesOfDocument(Document document); Stream<Stream<Token>> streamTokensOfSentencesOfDocument(Document document); Stream<Stream<S>> streamSpans2D(List<? extends List<S>> spans2D); void encodeEach(S span); void encodeEach(S span, Function<S, String> getText); void encodeEach1D(List<S> spans); void encodeEach1D(List<S> spans, Function<S, String> getText); void encodeEach2D(List<? extends List<S>> spans); void encodeEach2D(List<? extends List<S>> spans, Function<S, String> getText); String[] spansToStringArray1D(Stream<S> spans); String[] spansToStringArray1D(Stream<S> spans, Function<S, String> getText); String[][] spansToStringArray2D(Stream<? extends Stream<S>> spans); String[][] spansToStringArray2D(Stream<? extends Stream<S>> spans, Function<S, String> getText); void putVectorInSpan(S span, double[] data); void putVectorInSpans(Stream<S> spans, double[][] data); void putVectorInSpans(Stream<? extends Stream<S>> spans, double[][][] data);  }