lib/nlp_arabic/acts_as_document.rb
#To get row terms of this document from Term table
To get row terms of this document from Term table
To get row terms of this document from Term table
def terms
        terms = Term.joins("LEFT OUTER JOIN freq_term_in_docs ON freq_term_in_docs.word = terms.word AND freq_term_in_docs.doc_id = #{self.id}")
        return terms
      end
def terms terms = Term . joins ( "LEFT OUTER JOIN freq_term_in_docs ON freq_term_in_docs.word = terms.word AND freq_term_in_docs.doc_id = #{self.id}" ) return terms end
To get row terms of this document from Term table
To get row terms of this document from Term table
#SELECT terms.* FROM terms #  INNER JOIN freq_term_in_docs On freq_term_in_docs.word = terms.word #  INNER JOIN transactions On freq_term_in_docs.doc_id = 1