Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'cannot find symbol' compilation error #7

Open
matlabat opened this issue Jul 23, 2018 · 1 comment
Open

'cannot find symbol' compilation error #7

matlabat opened this issue Jul 23, 2018 · 1 comment

Comments

@matlabat
Copy link

matlabat commented Jul 23, 2018

Hi,

Thanks for sharing your work.
I have a compilation error when I'm trying to compile RatioGPUDMM.java

$ javac RatioGPUDMM.java
RatioGPUDMM.java:17: error: cannot find symbol
import RatioGPUDMM.Document;
^
symbol: class Document
location: package RatioGPUDMM
RatioGPUDMM.java:26: error: cannot find symbol
public ArrayList docList;
^
symbol: class Document
location: class RatioGPUDMM
RatioGPUDMM.java:60: error: cannot find symbol
public RatioGPUDMM(ArrayList doc_list, int num_topic, int num_iter, int save_step, double beta,
^
symbol: class Document
location: class RatioGPUDMM
RatioGPUDMM.java:445: error: cannot find symbol
Document doc = docList.get(i);
^
symbol: class Document
location: class RatioGPUDMM
RatioGPUDMM.java:473: error: variable topic is already defined in method init_GSDMM()
int topic = rg.nextInt(numTopic);
^
RatioGPUDMM.java:721: error: cannot find symbol
ArrayList doc_list = new Document.LoadCorpus("corpus.txt");
^
symbol: class Document
location: class RatioGPUDMM
RatioGPUDMM.java:721: error: package Document does not exist
ArrayList doc_list = new Document.LoadCorpus("corpus.txt");
^
7 errors

My version of java:

$ java -version
java version "1.8.0_111"
Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)

I'm not really an expert of Java (Python) and I haven't found the bug.
Could you help me please?

Thx mat

@fdmorison
Copy link

fdmorison commented Aug 2, 2018

One + to this issue, specially to

error: variable topic is already defined in method init_GSDMM()

Would the following change be a solution?
``

// Actual code
int[] termIDArray = docToWordIDList.get(d);
int topic = assignmentList[d];
int topic = rg.nextInt(numTopic);
assignmentList[d] = topic;
normalCount(topic, termIDArray, +1);

// Expected code?
int[] termIDArray = docToWordIDList.get(d);
int topic = assignmentList[d];
assignmentList[d] = rg.nextInt(numTopic);;
normalCount(topic, termIDArray, +1);

``

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants