@@ -270,10 +270,6 @@ public float getDirectAddressingMaxOversizingFactor() {
270270 return directAddressingMaxOversizingFactor ;
271271 }
272272
273- public long getTermCount () {
274- return frontier [0 ].inputCount ;
275- }
276-
277273 public long getNodeCount () {
278274 // 1+ in order to count the -1 implicit final node
279275 return 1 + nodeCount ;
@@ -749,7 +745,6 @@ public void add(IntsRef input, T output) throws IOException {
749745 // format cannot represent the empty input since
750746 // 'finalness' is stored on the incoming arc, not on
751747 // the node
752- frontier [0 ].inputCount ++;
753748 frontier [0 ].isFinal = true ;
754749 fst .setEmptyOutput (output );
755750 return ;
@@ -760,9 +755,6 @@ public void add(IntsRef input, T output) throws IOException {
760755 int pos2 = input .offset ;
761756 final int pos1Stop = Math .min (lastInput .length (), input .length );
762757 while (true ) {
763- frontier [pos1 ].inputCount ++;
764- // System.out.println(" incr " + pos1 + " ct=" + frontier[pos1].inputCount + " n=" +
765- // frontier[pos1]);
766758 if (pos1 >= pos1Stop || lastInput .intAt (pos1 ) != input .ints [pos2 ]) {
767759 break ;
768760 }
@@ -786,7 +778,6 @@ public void add(IntsRef input, T output) throws IOException {
786778 // init tail states for current input
787779 for (int idx = prefixLenPlus1 ; idx <= input .length ; idx ++) {
788780 frontier [idx - 1 ].addArc (input .ints [input .offset + idx - 1 ], frontier [idx ]);
789- frontier [idx ].inputCount ++;
790781 }
791782
792783 final UnCompiledNode <T > lastNode = frontier [input .length ];
@@ -835,8 +826,6 @@ public void add(IntsRef input, T output) throws IOException {
835826
836827 // save last input
837828 lastInput .copyInts (input );
838-
839- // System.out.println(" count[0]=" + frontier[0].inputCount);
840829 }
841830
842831 private boolean validOutput (T output ) {
@@ -906,10 +895,6 @@ static final class UnCompiledNode<T> implements Node {
906895 T output ;
907896 boolean isFinal ;
908897
909- // TODO: remove this tracking? we used to use it for confusingly pruning NodeHash, but
910- // we switched to LRU by RAM usage instead:
911- long inputCount ;
912-
913898 /** This node's depth, starting from the automaton root. */
914899 final int depth ;
915900
@@ -935,7 +920,6 @@ void clear() {
935920 numArcs = 0 ;
936921 isFinal = false ;
937922 output = owner .NO_OUTPUT ;
938- inputCount = 0 ;
939923
940924 // We don't clear the depth here because it never changes
941925 // for nodes on the frontier (even when reused).
0 commit comments