Skip to content

Commit 488e227

Browse files
committed
OPENNLP-421 - Update JavaDoc
1 parent 7c9f991 commit 488e227

File tree

7 files changed

+11
-11
lines changed

7 files changed

+11
-11
lines changed

opennlp-tools/src/main/java/opennlp/tools/util/StringList.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public class StringList implements Iterable<String> {
3535
* Initializes a {@link StringList} instance.
3636
* <p>
3737
* Note: <br>
38-
* Token String will be interened via {@link StringInterners}.
38+
* Token String will be interned via {@link StringInterners}.
3939
*
4040
* @param singleToken One single token
4141
*/
@@ -47,7 +47,7 @@ public StringList(String singleToken) {
4747
* Initializes a {@link StringList} instance.
4848
* <p>
4949
* Note: <br>
50-
* Token Strings will be interened via {@link StringInterners}.
50+
* Token Strings will be interned via {@link StringInterners}.
5151
*
5252
* @param tokens The string parts of the new {@link StringList}.
5353
* Must not be an empty tokens array or {@code null}.

opennlp-tools/src/main/java/opennlp/tools/util/jvm/CHMStringDeduplicator.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,16 @@
3232
* Origin:
3333
* <a href="https://shipilev.net/talks/joker-Oct2014-string-catechism.pdf">
3434
* https://shipilev.net/talks/joker-Oct2014-string-catechism.pdf</a>
35-
* <p>
3635
*/
3736
@Internal
3837
@ThreadSafe
3938
class CHMStringDeduplicator implements StringInterner {
4039
private final int prob;
4140
private final Map<String, String> map;
4241

42+
/**
43+
* Creates a {@link CHMStringDeduplicator} with a probability of {@code 0.5}.
44+
*/
4345
public CHMStringDeduplicator() {
4446
this(0.5);
4547
}

opennlp-tools/src/main/java/opennlp/tools/util/jvm/CHMStringInterner.java

-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
* Origin:
3030
* <a href="https://shipilev.net/jvm/anatomy-quarks/10-string-intern/">
3131
* https://shipilev.net/jvm/anatomy-quarks/10-string-intern/</a>
32-
* <p>
3332
*/
3433
@Internal
3534
@ThreadSafe

opennlp-tools/src/main/java/opennlp/tools/util/jvm/HMStringInterner.java

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
* Origin:
2929
* <a href="https://shipilev.net/jvm/anatomy-quarks/10-string-intern/">
3030
* https://shipilev.net/jvm/anatomy-quarks/10-string-intern/</a>
31-
* <p>
3231
*/
3332
@Internal
3433
class HMStringInterner implements StringInterner {

opennlp-tools/src/main/java/opennlp/tools/util/jvm/JvmStringInterner.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
* <p>
2727
* Using this {@link StringInterner} brings back the default behaviour of OpenNLP before version
2828
* {@code 2.3.2}. You can use it by setting the system property {@code opennlp.interner.class} to
29-
* the full qualified classname of a {@link StringInterner} implementation.
29+
* the fully qualified classname of a {@link StringInterner} implementation.
3030
* </p>
3131
*/
3232
@Internal

opennlp-tools/src/main/java/opennlp/tools/util/jvm/StringInterner.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ public interface StringInterner {
2424

2525
/**
2626
* Interns and returns a reference to the representative instance
27-
* for any of a collection of string instances that are equal to each other.
27+
* for any collection of string instances that are equal to each other.
2828
*
29-
* @param s string instance to be interned
29+
* @param sample string instance to be interned
3030
* @return reference to the interned string instance
3131
*/
32-
String intern(String s);
32+
String intern(String sample);
3333
}

opennlp-tools/src/main/java/opennlp/tools/util/jvm/StringInterners.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
/**
2626
* Provides string interning utility methods. Interning mechanism can be configured via the
2727
* system property {@code opennlp.interner.class} by specifying an implementation via its
28-
* full qualified classname. It needs to implement {@link StringInterner}.
28+
* fully qualified classname. It needs to implement {@link StringInterner}.
2929
* <p>
3030
* If not specified by the user, the default interner is {@link CHMStringInterner}.
3131
*/
@@ -53,7 +53,7 @@ public class StringInterners {
5353

5454
/**
5555
* Interns and returns a reference to the representative instance
56-
* for any of a collection of string instances that are equal to each other.
56+
* for any collection of string instances that are equal to each other.
5757
*
5858
* @param sample string instance to be interned
5959
* @return reference to the interned string instance

0 commit comments

Comments
 (0)