View on
Ted Pedersen > WordNet-Similarity > WordNet::Similarity::FrequencyCounter



Annotate this POD


Open  6
View/Report Bugs
Module Version: 2.05   Source  


WordNet::Similarity::FrequencyCounter - Support functions for frequency counting programs used to estimate the information content of concepts.


createTopHash ($wn)

Creates and loads the topmost nodes hash from WordNet.

returns: $topHash, a reference to a hash containing the topmost nodes of the noun and verb hierarchies in WordNet.

updateWordFrequency ($word, $offsetFreq, $wn [, $opt_resnik])

Updates the counts of a given word in a given offset-frequency hash. It finds the offsets of all concepts corresponding to the given word in WordNet, and increments the frequency counts of these in the hash.

returns: nothing.

propagateFrequency ($offsetFreq, $wn, $topHash)

This function propagates the frequencies up the is-a hierarchies in WordNet, and return a hash with the new frequency counts.

returns: $newFreq, hash containing updated counts.


  Ted Pedersen, University of Minnesota Duluth
  tpederse at

  Siddharth Patwardhan, University of Utah, Salt Lake City
  sidd at



To submit a bug report, go to or send e-mail to tpederse at


perl(1), WordNet::Similarity(3)


Copyright (c) 2008, Ted Pedersen and Siddharth Patwardhan

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to

    The Free Software Foundation, Inc.,
    59 Temple Place - Suite 330,
    Boston, MA  02111-1307, USA.

Note: a copy of the GNU General Public License is available on the web at and is included in this distribution as GPL.txt.

syntax highlighting: