Getting Compiler Errors Running CMAKE for Assignment 3


#1

Getting a number of compiler errors when I run CMAKE on Assignment 3. Has any one experienced this ? Here are some of the errors I am encountering.

Can some one please tell me what I need to do to correct this problem. Complier errors are shown below.

/Users/markberman/Assignment_3/association.cpp:61:23: error: no viable

  conversion from 'size_t' (aka 'unsigned long') to 'term_id' (aka

  'numerical_identifier<meta::term_id_tag, unsigned long long>')

if (idx->doc_freq(i) > 20)  // Ignore words with document frequency below 20

/Users/markberman/Assignment_3/association.cpp:64:31: error: no viable

  conversion from 'size_t' (aka 'unsigned long') to 'term_id' (aka

  'numerical_identifier<meta::term_id_tag, unsigned long long>')

      idx->search_primary(i)

/Users/markberman/Assignment_3/association.cpp:69:27: error: no viable

  conversion from 'size_t' (aka 'unsigned long') to 'term_id' (aka

  'numerical_identifier<meta::term_id_tag, unsigned long long>')

    if (idx->doc_freq(j) >

/Users/markberman/Assignment_3/association.cpp:73:35: error: no viable

  conversion from 'size_t' (aka 'unsigned long') to 'term_id' (aka

  'numerical_identifier<meta::term_id_tag, unsigned long long>')

          idx->search_primary(j)->counts();  // Extract the documents that

                              ^

Users/markberman/Assignment_3/plsa.cpp:268:36: error: no viable conversion from

  'mapped_type' (aka 'int') to 'term_id' (aka

  'numerical_identifier<meta::term_id_tag, unsigned long long>')

  submission << idx->term_text(inverse_term_index[indices[j]]) << " "

                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/Users/markberman/Assignment_3/plsa.cpp:334:35: error: no viable conversion from

  'size_t' (aka 'unsigned long') to 'term_id' (aka

  'numerical_identifier<meta::term_id_tag, unsigned long long>')

if (idx->total_num_occurences(i) > 1) {

#2

I don’t know what “Assignment 3” is, so I can offer little help here (this forum is for the MeTA toolkit in general, not for any particular course’s assignments).

If this is for a class, can you try asking your TAs or the instructor? They are likely in a better position to be able to answer this.


#3

Hi there - I got this error too - for Assignment 3 Coursera Text Mining course. What was the solution here?