test_class.file: extra/src/test/java/org/wikimedia/search/extra/regex/ngram/NGramExtractorTest.java
test_class.identifier: NGramExtractorTest
test_case.body: @Test
      public void maxNgrams() {
          NGramExtractor gram = new NGramExtractor(3, 4, 10000, 3, new KeywordAnalyzer());
          Automaton automaton = new RegExp("hero of legend").toAutomaton();
          assertEquals(
                  new And<>(leaves("her", "ero", "ro ")),
                  gram.extract(automaton));
      }
test_case.class_method_signature: NGramExtractorTest.maxNgrams()
test_case.full_signature: @Test public void maxNgrams()
test_case.identifier: maxNgrams
test_case.invocations: toAutomaton assertEquals leaves extract
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void maxNgrams()
focal_class.declarator: gramSize
focal_class.modifier: private final
focal_class.original_string: private final int gramSize;
focal_class.type: int
focal_class.var_name: gramSize
focal_class.declarator: maxExpand
focal_class.modifier: private final
focal_class.original_string: private final int maxExpand;
focal_class.type: int
focal_class.var_name: maxExpand
focal_class.declarator: maxStatesTraced
focal_class.modifier: private final
focal_class.original_string: private final int maxStatesTraced;
focal_class.type: int
focal_class.var_name: maxStatesTraced
focal_class.declarator: maxNgrams
focal_class.modifier: private final
focal_class.original_string: private final int maxNgrams;
focal_class.type: int
focal_class.var_name: maxNgrams
focal_class.declarator: ngramAnalyzer
focal_class.modifier: private final
focal_class.original_string: private final Analyzer ngramAnalyzer;
focal_class.type: Analyzer
focal_class.var_name: ngramAnalyzer
focal_class.file: extra/src/main/java/org/wikimedia/search/extra/regex/ngram/NGramExtractor.java
focal_class.identifier: NGramExtractor
focal_class.class_method_signature: NGramExtractor.NGramExtractor(int gramSize, int maxExpand, int maxStatesTraced, int maxNgrams, Analyzer ngramAnalyzer)
focal_class.full_signature: public  NGramExtractor(int gramSize, int maxExpand, int maxStatesTraced, int maxNgrams, Analyzer ngramAnalyzer)
focal_class.identifier: NGramExtractor
focal_class.modifiers: public
focal_class.parameters: (int gramSize, int maxExpand, int maxStatesTraced, int maxNgrams, Analyzer ngramAnalyzer)
focal_class.signature:  NGramExtractor(int gramSize, int maxExpand, int maxStatesTraced, int maxNgrams, Analyzer ngramAnalyzer)
focal_class.class_method_signature: NGramExtractor.extract(Automaton automaton)
focal_class.full_signature: public Expression<String> extract(Automaton automaton)
focal_class.identifier: extract
focal_class.modifiers: public
focal_class.parameters: (Automaton automaton)
focal_class.return: Expression<String>
focal_class.signature: Expression<String> extract(Automaton automaton)
focal_method.body: public Expression<String> extract(Automaton automaton) {
          if (automaton.isAccept(0)) {
              return True.instance();
          }
          return new NGramAutomaton(automaton, gramSize, maxExpand, maxStatesTraced, maxNgrams, ngramAnalyzer).expression().simplify();
      }
focal_method.class_method_signature: NGramExtractor.extract(Automaton automaton)
focal_method.full_signature: public Expression<String> extract(Automaton automaton)
focal_method.identifier: extract
focal_method.invocations: isAccept instance simplify expression
focal_method.modifiers: public
focal_method.parameters: (Automaton automaton)
focal_method.return: Expression<String>
focal_method.signature: Expression<String> extract(Automaton automaton)