class_docstr: This class implements the actual language identifier.
class_docstr_tok: ["This","class","implements","the","actual","language","identifier","."]
code: def from_modelstring(cls, string, *args, **kwargs):
      b = base64.b64decode(string)
      z = bz2.decompress(b)
      model = loads(z)
      nb_ptc, nb_pc, nb_classes, tk_nextmove, tk_output = model
      nb_numfeats = int(len(nb_ptc) / len(nb_pc))
  
      # reconstruct pc and ptc
      nb_pc = np.array(nb_pc)
      nb_ptc = np.array(nb_ptc).reshape(nb_numfeats, len(nb_pc))
  
      return cls(
          nb_ptc,
          nb_pc,
          nb_numfeats,
          nb_classes,
          tk_nextmove,
          tk_output,
          *args,
          **kwargs,
      )
  
imports: from __future__ import print_function
  import base64
  import bz2
  import json
  import optparse
  import sys
  import logging
  import numpy
  from wsgiref.simple_server import make_server
  from wsgiref.util import shift_path_info
  from collections import defaultdict
label_desc: Use image node_id 1 for calling the LanguageIdentifier obj's underlying member method code with example usage: obj.from_modelstring(cls, string) and returns: cls