@Test void testSearchTilde() { String description = "body~0.5 length~0.5"; Set<String> expected = Sets.newHashSet("length~0.5", "body~0.5"); Set<String> actual = semanticSearchServiceHelper.removeStopWords(description); assertEquals(expected, actual); }
public Set<String> removeStopWords(String description) { return stream(description.split(ILLEGAL_CHARS_REGEX)) .map(String::toLowerCase) .filter(w -> !NGramDistanceAlgorithm.STOPWORDSLIST.contains(w) && StringUtils.isNotEmpty(w)) .collect(Collectors.toSet()); }
SemanticSearchServiceHelper { public Set<String> removeStopWords(String description) { return stream(description.split(ILLEGAL_CHARS_REGEX)) .map(String::toLowerCase) .filter(w -> !NGramDistanceAlgorithm.STOPWORDSLIST.contains(w) && StringUtils.isNotEmpty(w)) .collect(Collectors.toSet()); } }
SemanticSearchServiceHelper { public Set<String> removeStopWords(String description) { return stream(description.split(ILLEGAL_CHARS_REGEX)) .map(String::toLowerCase) .filter(w -> !NGramDistanceAlgorithm.STOPWORDSLIST.contains(w) && StringUtils.isNotEmpty(w)) .collect(Collectors.toSet()); } SemanticSearchServiceHelper(
      DataService dataService,
      OntologyService ontologyService,
      TermFrequencyService termFrequencyService); }
SemanticSearchServiceHelper { public Set<String> removeStopWords(String description) { return stream(description.split(ILLEGAL_CHARS_REGEX)) .map(String::toLowerCase) .filter(w -> !NGramDistanceAlgorithm.STOPWORDSLIST.contains(w) && StringUtils.isNotEmpty(w)) .collect(Collectors.toSet()); } SemanticSearchServiceHelper(
      DataService dataService,
      OntologyService ontologyService,
      TermFrequencyService termFrequencyService); QueryRule createDisMaxQueryRuleForAttribute(
      Set<String> searchTerms, Collection<OntologyTerm> ontologyTerms); QueryRule createDisMaxQueryRuleForTerms(List<String> queryTerms); QueryRule createBoostedDisMaxQueryRuleForTerms(
      List<String> queryTerms, Double boostValue); QueryRule createShouldQueryRule(String multiOntologyTermIri); List<String> parseOntologyTermQueries(OntologyTerm ontologyTerm); Set<String> getOtLabelAndSynonyms(OntologyTerm ontologyTerm); Map<String, String> collectExpandedQueryMap(
      Set<String> queryTerms, Collection<OntologyTerm> ontologyTerms); void collectOntologyTermQueryMap(
      Map<String, String> expanedQueryMap, OntologyTerm ontologyTerm); List<String> getAttributeIdentifiers(EntityType sourceEntityType); List<OntologyTerm> findTags(String description, List<String> ontologyIds); String processQueryString(String queryString); String parseBoostQueryString(String queryString, double boost); String escapeCharsExcludingCaretChar(String string); Set<String> removeStopWords(String description); }
SemanticSearchServiceHelper { public Set<String> removeStopWords(String description) { return stream(description.split(ILLEGAL_CHARS_REGEX)) .map(String::toLowerCase) .filter(w -> !NGramDistanceAlgorithm.STOPWORDSLIST.contains(w) && StringUtils.isNotEmpty(w)) .collect(Collectors.toSet()); } SemanticSearchServiceHelper(
      DataService dataService,
      OntologyService ontologyService,
      TermFrequencyService termFrequencyService); QueryRule createDisMaxQueryRuleForAttribute(
      Set<String> searchTerms, Collection<OntologyTerm> ontologyTerms); QueryRule createDisMaxQueryRuleForTerms(List<String> queryTerms); QueryRule createBoostedDisMaxQueryRuleForTerms(
      List<String> queryTerms, Double boostValue); QueryRule createShouldQueryRule(String multiOntologyTermIri); List<String> parseOntologyTermQueries(OntologyTerm ontologyTerm); Set<String> getOtLabelAndSynonyms(OntologyTerm ontologyTerm); Map<String, String> collectExpandedQueryMap(
      Set<String> queryTerms, Collection<OntologyTerm> ontologyTerms); void collectOntologyTermQueryMap(
      Map<String, String> expanedQueryMap, OntologyTerm ontologyTerm); List<String> getAttributeIdentifiers(EntityType sourceEntityType); List<OntologyTerm> findTags(String description, List<String> ontologyIds); String processQueryString(String queryString); String parseBoostQueryString(String queryString, double boost); String escapeCharsExcludingCaretChar(String string); Set<String> removeStopWords(String description); static final int MAX_NUM_TAGS; }