Hello,
i write a program that creates many hashTable; it counts the frequency of each word in some document s(that it's very large). So there are many words... This is a part of code. Do you know how come overcome this problem (in general) ?
thanks
..............................
HashMap<String, Double> frequency = null;
for (every document ) {
frequency = new HashMap<String, Double>();
//select a word and count
frequecny.put( myWord , new Integer (count ) );
}
.................................................................
..............................
HashMap<String, Double> frequency = null;
for (every document ) {
frequency = new HashMap<String, Double>();
//select a word and count
frequecny.put( myWord , new Integer (count ) );
}
.................................................................
To copy to clipboard, switch view to plain text mode
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at java.util.HashMap.resize(Unknown Source)
at java.util.HashMap.addEntry(Unknown Source)
at java.util.HashMap.put(Unknown Source)
at MyClass.setting(MyClass.java:71)
at filter.main(filter.java:19)
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at java.util.HashMap.resize(Unknown Source)
at java.util.HashMap.addEntry(Unknown Source)
at java.util.HashMap.put(Unknown Source)
at MyClass.setting(MyClass.java:71)
at filter.main(filter.java:19)
To copy to clipboard, switch view to plain text mode
Bookmarks