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"]
code: def __init__(self, weights=None):
      # Each feature gets its own weight vector, so weights is a dict-of-dicts
      self.weights = weights if weights else {}
      self.classes = set()
      # The accumulated values, for the averaging. These will be keyed by
      # feature/clas tuples
      self._totals = defaultdict(int)
      # The last time the feature was changed, for the averaging. Also
      # keyed by feature/clas tuples
      # (tstamps is short for timestamps)
      self._tstamps = defaultdict(int)
      # Number of instances seen
      self.i = 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 1 to create a new AveragedPerceptron object  with example: obj = AveragedPerceptron(weights)