class Object

Constants

ADJ
ADV
ALL_RESPONSES_PLAGIARISED
ALPHA_FREQ
ANTONYM
BETA_FREQ
CLOSED_CLASS_WORDS
THE FIRST TWO SETS ARE COMMON WORDS DURING OVERLAP ACROSS DEFINITIONS OR EXAMPLES.
THE THIRD SET IS TO PREVENT FREQUENT WORDS FROM BEING COMPARED WITH OTHER TOKENS.

end

COMMONPARENTS
DISTINCT
EQUAL

used by patternIdentify and predictClass and relevance, while comparing edges!

EXACT
FREQUENT_WORDS

tokens containing these words aren’t compared with other tokens, because they don’t add any meaning

HOLONYM
HYPERNYM
HYPONYM
MAX
MERONYM
NEGATED
NEGATED_WORDS

SENTENCE CLAUSE OR PHRASE FOLLOWING THESE WORDS CARRY A NEGATIVE MEANING (EITHER SUBTLE OR OVERT)

NEGATIVE_DESCRIPTOR
NEGATIVE_DESCRIPTORS

If negative words were found and a neg. descriptor is seen => (-)(-) = (+) public static String[] NEGATIVE_DESCRIPTORS = new String;

NEGATIVE_PHRASE
NEGATIVE_PHRASES
NEGATIVE_WORD
NEGCOMMONPARENTS
NEGEXACT
NEGHOLONYM
NEGHYPERNYM
NEGHYPONYM
NEGMERONYM
NEGOVERLAPDEFIN
NEGOVERLAPEXAM

negative matches

NGRAM

for plgiarism checking - n-gram

NOMATCH

constants used by WordnetBasedSimilarity initializing constants

NOUN
Create a parser object

frequently used general constants prevtype tokens for graph generator

OVERLAPDEFIN
OVERLAPEXAM
POSITIVE
SENTENCES
SIM_MATCH

constants from text_preprocessing

SOME_RESPONSES_PLAGIARISED
STOP_WORDS

@invisible

SUGGESTIVE
SUGGESTIVE_PHRASES

suggestive phrases

SUGGESTIVE_WORDS
SYNONYM
THRESHOLD

threshold for tone

VERB
WORDS

constants used by graph generator

Public Instance Methods

identify_frequency_and_prune_edges(edges, num) click to toggle source
# File lib/automated_metareview/graph_generator.rb, line 658
def identify_frequency_and_prune_edges(edges, num)
  # puts "inside frequency threshold! :: num #{num}"
  #freqEdges maintains the top frequency edges from ALPHA_FREQ to BETA_FREQ
  freqEdges = Array.new #from alpha = 3 to beta = 10
  #iterating through all the edges
  for j in (0..num-1) 
    if(!edges[j].nil?)       
      if(edges[j].frequency <= BETA_FREQ and edges[j].frequency >= ALPHA_FREQ and !freqEdges[edges[j].frequency-1].nil?)#{
        for i in (0..freqEdges[edges[j].frequency-1].length - 1)#iterating to find i for which freqEdges is null
          if(!freqEdges[edges[j].frequency-1][i].nil?)
            break
          end
        end
        freqEdges[edges[j].frequency-1][i] = edges[j]
      end
    end
  end
  selectedEdges = Array.new  
  #Selecting only those edges that satisfy the frequency condition [between ALPHA and BETA]
  j = BETA_FREQ-1
  while j >= ALPHA_FREQ-1 do 
    if(!freqEdges[j].nil?)
      for i in (0..num-1)
        if(!freqEdges[j][i].nil?)
          selectedEdges[maxSelected] = freqEdges[j][i]
          maxSelected+=1
        end
      end
    end
    j-=1
  end
    
  if(maxSelected != 0)
    @num_edges = maxSelected #replacing numEdges with the number of selected edges
  end
  return selectedEdges
end