This methods reset counters for all words in vocabulary
511365
public void resetWordCounters() {
        for (VocabularyWord word : getVocabulary()) {
            word.setHuffmanNode(null);
            word.setFrequencyShift(null);
            word.setCount(0);
        }
    }
592381
def reset(self):
        
        self.expr = []
        self.matcher = None
        self.last_matcher = None
        self.description = None
33880
public final void reset() {
    equivalencesMatched.clear();
    allFeatsIn = false;
    tokCnt = 0;
    featuresFound.clear();
    tmpFeaturesFound.clear();
    tokSequence.clear();
    tokSequenceEquivalences.clear();
    readingsCounter = 1;
    uniMatched = false;
    uniAllMatched = false;
    inUnification = false;
  }
603772
def remove_words(self, words):
        
        for word in words:
            self._dictionary.pop(word.lower())
        self._update_dictionary()
382769
def reset(self):
        
        self.result = {'encoding': None, 'confidence': 0.0, 'language': None}
        self.done = False
        self._got_data = False
        self._has_win_bytes = False
        self._input_state = InputState.PURE_ASCII
        self._last_char = b''
        if self._esc_charset_prober:
            self._esc_charset_prober.reset()
        for prober in self._charset_probers:
            prober.reset()
1211241
void reduceVocab()
    {
        table = new int[vocabSize];
        int j = 0;
        for (int i = 0; i < vocabSize; i++)
        {
            if (vocab[i].cn > minReduce)
            {
                vocab[j].cn = vocab[i].cn;
                vocab[j].word = vocab[i].word;
                table[vocabIndexMap.get(vocab[j].word)] = j;
                j++;
            }
            else
            {
                table[vocabIndexMap.get(vocab[j].word)] = -4;
            }
        }
        // adjust the index in the cache
        try
        {
            cache.close();
            File fixingFile = new File(cacheFile.getAbsolutePath() + ".fixing");
            cache = new DataOutputStream(new FileOutputStream(fixingFile));
            DataInputStream oldCache = new DataInputStream(new FileInputStream(cacheFile));
            while (oldCache.available() >= 4)
            {
                int oldId = oldCache.readInt();
                if (oldId < 0)
                {
                    cache.writeInt(oldId);
                    continue;
                }
                int id = table[oldId];
                if (id == -4) continue;
                cache.writeInt(id);
            }
            oldCache.close();
            cache.close();
            if (!fixingFile.renameTo(cacheFile))
            {
                throw new RuntimeException(String.format("moving %s to %s failed", fixingFile.getAbsolutePath(), cacheFile.getName()));
            }
            cache = new DataOutputStream(new FileOutputStream(cacheFile));
        }
        catch (IOException e)
        {
            throw new RuntimeException(String.format("failed to adjust cache file", e));
        }
        table = null;
        vocabSize = j;
        vocabIndexMap.clear();
        for (int i = 0; i < vocabSize; i++)
        {
            vocabIndexMap.put(vocab[i].word, i);
        }
        minReduce++;
    }
527714
def reset ():
    
    global __prefixes_suffixes, __suffixes_to_types, __types, __rule_names_to_types, __target_suffixes_cache

    __register_features ()

    # Stores suffixes for generated targets.
    __prefixes_suffixes = [property.PropertyMap(), property.PropertyMap()]

    # Maps suffixes to types
    __suffixes_to_types = {}

    # A map with all the registered types, indexed by the type name
    # Each entry is a dictionary with following values:
    # 'base': the name of base type or None if type has no base
    # 'derived': a list of names of type which derive from this one
    # 'scanner': the scanner class registered for this type, if any
    __types = {}

    # Caches suffixes for targets with certain properties.
    __target_suffixes_cache = {}
640961
def reset(self):
        
        self.grid = [[0 for dummy_l in range(self.grid_width)] for dummy_l in range(self.grid_height)]
1062821
public function resetAll()
    {
        $this->sphinx->ResetFilters();
        $this->sphinx->ResetGroupBy();
        $this->sphinx->ResetOverrides();
        $this->sphinx->SetSortMode(SPH_SORT_RELEVANCE);
        $this->resetLimits();
    }
268373
def reset(self):
        
        self.remaining_cycles = self.initial_training_cycles
        self.needle_index = random.randrange(self.input_size)
1194688
def count_words(file):
  
  c = Counter()
  with open(file, 'r') as f:
    for l in f:
      words = l.strip().split()
      c.update(words)
  return c
1245149
public void incrementWordCounter(String word) {
        if (vocabulary.containsKey(word)) {
            vocabulary.get(word).incrementCount();
        }
        // there's no need to throw such exception here. just do nothing if word is not found
        //else throw new IllegalStateException("No such word found");
    }
850973
def reset(self):
		
		self.gametree = self.game
		self.nodenum = 0
		self.index = 0
		self.stack = []
		self.node = self.gametree[self.index]
		self._setChildren()
		self._setFlags()
76865
public void reset() {
    lastReset = new Date();

    if (counters != null) {
      synchronized (counters) {
        counters.clear();
      }
    }

    if (chronos != null) {
      synchronized (chronos) {
        chronos.clear();
      }
    }

    if (stats != null) {
      synchronized (stats) {
        stats.clear();
      }
    }
  }
759889
def reset(self):
        
        for _, item in self.iter_items(recursive=True):
            item.reset()
303211
def reset(self):
        
        for name in self.__dict__:
            if name.startswith("_"):
                continue

            attr = getattr(self, name)
            setattr(self, name, attr and attr.__class__())
802489
public function ResetAllDiscounts()
    {
        $iCurrentPosition = $this->getItemPointer();
        $this->GoToStart();

        while ($oItem = &$this->Next()) {
            $oItem->ResetDiscounts();
        }
        $this->setItemPointer($iCurrentPosition);
    }