We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a995ee8 commit 6d1daf3Copy full SHA for 6d1daf3
src/main/java/info/debatty/java/stringsimilarity/KShingling.java
@@ -92,7 +92,7 @@ public final void setK(int k) {
92
* @return
93
*/
94
public HashMap<String, Integer> getProfile(String s) {
95
- HashMap<String, Integer> r = new HashMap<String, Integer>();
+ HashMap<String, Integer> r = new HashMap<String, Integer>(s.length() / 2);
96
s = spaceReg.matcher(s).replaceAll(" ");
97
String kgram;
98
for (int i = 0; i < (s.length() - k + 1); i++) {
0 commit comments