Skip to content

Commit

Permalink
Updated semantic search term count to discard stopwords
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Goetz committed Aug 19, 2008
1 parent 6d5b6f6 commit e621a82
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/custom/ontology/ontology.module
Expand Up @@ -718,11 +718,13 @@ function _ontology_get_occurrences($nid, $terms_to_check) {
$term_stem_counts = array();
foreach ($terms_to_check as $term) {
$term_pieces = explode(' ', $term->name);
$term_stem_counts[$term->tid] = count($term_pieces);
$term_stem_counts[$term->tid] = 0; //count($term_pieces);

foreach ($term_pieces as $piece) {
if (_ontology_is_stopword($piece))
continue;

$term_stem_counts[$term->tid]++;

$piece = PorterStemmer::Stem($piece);

Expand Down

0 comments on commit e621a82

Please sign in to comment.