class_docstr: An averaged perceptron, as implemented by Matthew Honnibal.
  
  See more implementation details here:
      https://explosion.ai/blog/part-of-speech-pos-tagger-in-python
class_docstr_tok: ["An","averaged","perceptron",",","as","implemented","by","Matthew","Honnibal",".","See","more","implementation","details","here",":","https",":","\/\/explosion.ai\/blog\/part-of-speech-pos-tagger-in-python"]
docstr: Update the feature weights.
docstr_tok: ["Update","the","feature","weights","."]
code: def update(self, truth, guess, features):
      """Update the feature weights."""
  
      def upd_feat(c, f, w, v):
          param = (f, c)
          self._totals[param] += (self.i - self._tstamps[param]) * w
          self._tstamps[param] = self.i
          self.weights[f][c] = w + v
  
      self.i += 1
      if truth == guess:
          return None
      for f in features:
          weights = self.weights.setdefault(f, {})
          upd_feat(truth, f, weights.get(truth, 0.0), 1.0)
          upd_feat(guess, f, weights.get(guess, 0.0), -1.0)
  
imports: import logging
  import pickle
  import random
  from collections import defaultdict
  from nltk import jsontags
  from nltk.data import find, load
  from nltk.tag.api import TaggerI
label_desc: Use image node_id 4 for calling the AveragedPerceptron obj's underlying member method code with example usage: obj.update(truth, guess, features) and returns: None