Skip to content

Commit

Permalink
improve code
Browse files Browse the repository at this point in the history
  • Loading branch information
jadepeng committed Oct 26, 2022
1 parent 11bb305 commit a44c93c
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ public class JcsegAnalyzer implements Analyzer {
);

private static final SegmenterConfig CONFIG = new SegmenterConfig();
private static final ADictionary DIC =
DictionaryFactory.createDefaultDictionary(CONFIG);
private static final ADictionary DIC = DictionaryFactory.createDefaultDictionary(CONFIG);

private final ISegment.Type type;

Expand All @@ -57,7 +56,7 @@ public JcsegAnalyzer(String mode) {
"the available values are %s", mode, SUPPORT_MODES);
}

if (mode.equals("Simple")) {
if ("Simple".equals(mode)) {
this.type = ISegment.SIMPLE;
} else {
this.type = ISegment.COMPLEX;
Expand Down

0 comments on commit a44c93c

Please sign in to comment.