Henry Wong wrote:
Also, if you are having a problem fixing the first error, then please show us the error message.
Henry
there are error occurence, while i try compling..
public short docType = DocumentIterator.TYPE_TEXT;
^
InvertedIndex.java:70: cannot find symbol
symbol : class TokenInfo
location: class InvertedIndex
tokenHash = new HashMap<
String, TokenInfo>();
^
InvertedIndex.java:71: cannot find symbol
symbol : class DocumentReference
location: class InvertedIndex
docRefs = new ArrayList<DocumentReference>();
^
InvertedIndex.java:82: cannot find symbol
symbol : class TokenInfo
location: class InvertedIndex
tokenHash = new HashMap<String, TokenInfo>();
^
InvertedIndex.java:83: cannot find symbol
symbol : class DocumentReference
location: class InvertedIndex
docRefs = new ArrayList<DocumentReference>();
^
InvertedIndex.java:97: cannot find symbol
symbol : class DocumentIterator
location: class InvertedIndex
DocumentIterator docIter = new DocumentIterator(dirFile, docType, stem);
^
InvertedIndex.java:97: cannot find symbol
symbol : class DocumentIterator
location: class InvertedIndex
DocumentIterator docIter = new DocumentIterator(dirFile, docType, stem);
^
InvertedIndex.java:102: cannot find symbol
symbol : class FileDocument
location: class InvertedIndex
FileDocument
doc = docIter.nextDocument();
^
InvertedIndex.java:105: cannot find symbol
symbol : class HashMapVector
location: class InvertedIndex
HashMapVector vector = doc.hashMapVector();
^
InvertedIndex.java:124: cannot find symbol
symbol : class Example
location: class InvertedIndex
for (Example example : examples) {
^
InvertedIndex.java:125: cannot find symbol
symbol : class FileDocument
location: class InvertedIndex
FileDocument doc = example.getDocument();
^
InvertedIndex.java:127: cannot find symbol
symbol : class HashMapVector
location: class InvertedIndex
HashMapVector vector = example.getHashMapVector();
^
InvertedIndex.java:141: cannot find symbol
symbol : class DocumentReference
location: class InvertedIndex
DocumentReference docRef = new DocumentReference(doc);
^
InvertedIndex.java:141: cannot find symbol
symbol : class DocumentReference
location: class InvertedIndex
DocumentReference docRef = new DocumentReference(doc);
^
InvertedIndex.java:145: cannot find symbol
symbol : class Weight
location: class InvertedIndex
for (Map.Entry<String, Weight> entry : vector.entrySet()) {
^
InvertedIndex.java:164: cannot find symbol
symbol : class TokenInfo
location: class InvertedIndex
TokenInfo tokenInfo = tokenHash.get(token);
^
InvertedIndex.java:167: cannot find symbol
symbol : class TokenInfo
location: class InvertedIndex
tokenInfo = new TokenInfo();
^
InvertedIndex.java:171: cannot find symbol
symbol : class TokenOccurrence
location: class InvertedIndex
tokenInfo.occList.add(new TokenOccurrence(docRef, count));
^
InvertedIndex.java:182: cannot find symbol
symbol : class TokenInfo
location: class InvertedIndex
Iterator<Map.Entry<String, TokenInfo>> mapEntries = tokenHash.entrySet().ite
rator();
^
InvertedIndex.java:185: cannot find symbol
symbol : class TokenInfo
location: class InvertedIndex
Map.Entry<String, TokenInfo> entry = mapEntries.next();
^
InvertedIndex.java:187: cannot find symbol
symbol : class TokenInfo
location: class InvertedIndex
TokenInfo tokenInfo = entry.getValue();
^
InvertedIndex.java:201: cannot find symbol
symbol : class TokenOccurrence
location: class InvertedIndex
for (TokenOccurrence occ : tokenInfo.occList) {
^
InvertedIndex.java:202: operator + cannot be applied to TokenOccurrence.docRef.l
ength,double
occ.docRef.length = occ.docRef.length + Math.pow(idf * occ.count, 2);
^
InvertedIndex.java:209: cannot find symbol
symbol : class DocumentReference
location: class InvertedIndex
for (DocumentReference docRef : docRefs) {
^
InvertedIndex.java:220: cannot find symbol
symbol : class TokenInfo
location: class InvertedIndex
for (Map.Entry<String, TokenInfo> entry : tokenHash.entrySet()) {
^
InvertedIndex.java:226: cannot find symbol
symbol : class TokenOccurrence
location: class InvertedIndex
for (TokenOccurrence occ : entry.getValue().occList) {
^
InvertedIndex.java:252: cannot find symbol
symbol : class TextStringDocument
location: class InvertedIndex
return retrieve(new TextStringDocument(input, stem));
^
InvertedIndex.java:272: cannot find symbol
symbol : class DocumentReference
location: class InvertedIndex
Map<DocumentReference, DoubleValue> retrievalHash =
^
InvertedIndex.java:272: cannot find symbol
symbol : class DoubleValue
location: class InvertedIndex
Map<DocumentReference, DoubleValue> retrievalHash =
^
InvertedIndex.java:273: cannot find symbol
symbol : class DocumentReference
location: class InvertedIndex
new HashMap<DocumentReference, DoubleValue>();
^
InvertedIndex.java:273: cannot find symbol
symbol : class DoubleValue
location: class InvertedIndex
new HashMap<DocumentReference, DoubleValue>();
^
InvertedIndex.java:277: cannot find symbol
symbol : class Weight
location: class InvertedIndex
for (Map.Entry<String, Weight> entry : vector.entrySet()) {
^
InvertedIndex.java:283: operator + cannot be applied to double,<any>
queryLength = queryLength + incorporateToken(token, count, retrievalHash);
^
InvertedIndex.java:283: incompatible types
found : <nulltype>
required: double
queryLength = queryLength + incorporateToken(token, count, retrievalHash);
^
InvertedIndex.java:289: cannot find symbol
symbol : class Retrieval
location: class InvertedIndex
Retrieval[] retrievals = new Retrieval[retrievalHash.size()];
^
InvertedIndex.java:289: cannot find symbol
symbol : class Retrieval
location: class InvertedIndex
Retrieval[] retrievals = new Retrieval[retrievalHash.size()];
^
InvertedIndex.java:293: cannot find symbol
symbol : class DocumentReference
location: class InvertedIndex
for (Map.Entry<DocumentReference, DoubleValue> entry : retrievalHash.entrySe
t()) {
^
InvertedIndex.java:293: cannot find symbol
symbol : class DoubleValue
location: class InvertedIndex
for (Map.Entry<DocumentReference, DoubleValue> entry : retrievalHash.entrySe
t()) {
^
InvertedIndex.java:294: cannot find symbol
symbol : class DocumentReference
location: class InvertedIndex
DocumentReference docRef = entry.getKey();
^
InvertedIndex.java:318: cannot find symbol
symbol : class Retrieval
location: class InvertedIndex
return new Retrieval(docRef, score);
^
InvertedIndex.java:335: cannot find symbol
symbol : class TokenInfo
location: class InvertedIndex
TokenInfo tokenInfo = tokenHash.get(token);
^
InvertedIndex.java:342: cannot find symbol
symbol : class TokenOccurrence
location: class InvertedIndex
for (TokenOccurrence occ : tokenInfo.occList) {
^
InvertedIndex.java:344: cannot find symbol
symbol : class DoubleValue
location: class InvertedIndex
DoubleValue val = retrievalHash.get(occ.docRef);
^
InvertedIndex.java:348: cannot find symbol
symbol : class DoubleValue
location: class InvertedIndex
val = new DoubleValue(0.0);
^
InvertedIndex.java:354: operator + cannot be applied to DoubleValue.value,double
val.value = val.value + weight * tokenInfo.idf * occ.count;
^
InvertedIndex.java:371: cannot find symbol
symbol : variable UserInput
location: class InvertedIndex
String query = UserInput.prompt("\nEnter query: ");
^
InvertedIndex.java:376: cannot find symbol
symbol : class HashMapVector
location: class InvertedIndex
HashMapVector queryVector = (new TextStringDocument(query, stem)).hashMapV
ector();
^
InvertedIndex.java:376: cannot find symbol
symbol : class TextStringDocument
location: class InvertedIndex
HashMapVector queryVector = (new TextStringDocument(query, stem)).hashMapV
ector();
^
InvertedIndex.java:377: cannot find symbol
symbol : class Retrieval
location: class InvertedIndex
Retrieval[] retrievals = retrieve(queryVector);
^
InvertedIndex.java:391: cannot find symbol
symbol : class Feedback
location: class InvertedIndex
Feedback fdback = null;
^
InvertedIndex.java:393: cannot find symbol
symbol : class Feedback
location: class InvertedIndex
fdback = new Feedback(queryVector, retrievals, this);
^
InvertedIndex.java:401: cannot find symbol
symbol : variable UserInput
location: class InvertedIndex
String command = UserInput.prompt("\n Enter command: ");
^
InvertedIndex.java:443: cannot find symbol
symbol : variable Browser
location: class InvertedIndex
System.out.println("Showing document " + showNumber + " in the " + Bro
wser.BROWSER_NAME + " window.");
^
InvertedIndex.java:444: cannot find symbol
symbol : variable Browser
location: class InvertedIndex
Browser.display(retrievals[showNumber - 1].docRef.file);
^
InvertedIndex.java:485: cannot find symbol
symbol : variable MoreString
location: class InvertedIndex
System.out.println(MoreString.padTo((i + 1) + ". ", 4) +
^
InvertedIndex.java:486: cannot find symbol
symbol : variable MoreString
location: class InvertedIndex
MoreString.padTo(retrievals[i].docRef.file.getName(), 20) +
^
InvertedIndex.java:488: cannot find symbol
symbol : variable MoreMath
location: class InvertedIndex
MoreMath.roundTo(retrievals[i].score, 5));
^
InvertedIndex.java:504: cannot find symbol
symbol : variable DocumentIterator
location: class InvertedIndex
short docType = DocumentIterator.TYPE_TEXT;
^
InvertedIndex.java:510: cannot find symbol
symbol : variable DocumentIterator
location: class InvertedIndex
docType = DocumentIterator.TYPE_HTML;
^
81 errors
Press any key to continue...
i hope you can help my error..
*deadline my task is entry