class_docstr: BIST parser model class.
  This class handles training, prediction, loading and saving of a BIST parser model.
  After the model is initialized, it accepts a CoNLL formatted dataset as input, and learns to
  output dependencies for new input.
  
  Args:
      activation (str, optional): Activation function to use.
      lstm_layers (int, optional): Number of LSTM layers to use.
      lstm_dims (int, optional): Number of LSTM dimensions to use.
      pos_dims (int, optional): Number of part-of-speech embedding dimensions to use.
  
  Attributes:
      model (MSTParserLSTM): The underlying LSTM model.
      params (tuple): Additional parameters and resources for the model.
      options (dict): User model options.
class_docstr_tok: ["BIST","parser","model","class",".","This","class","handles","training",",","prediction",",","loading","and","saving","of","a","BIST","parser","model",".","After","the","model","is","initialized",",","it","accepts","a","CoNLL","formatted","dataset","as","input",",","and","learns","to","output","dependencies","for","new","input",".","Args",":","activation","(","str",",","optional",")",":","Activation","function","to","use",".","lstm_layers","(","int",",","optional",")",":","Number","of","LSTM","layers","to","use",".","lstm_dims","(","int",",","optional",")",":","Number","of","LSTM","dimensions","to","use",".","pos_dims","(","int",",","optional",")",":","Number","of","part-of-speech","embedding","dimensions","to","use",".","Attributes",":","model","(","MSTParserLSTM",")",":","The","underlying","LSTM","model",".","params","(","tuple",")",":","Additional","parameters","and","resources","for","the","model",".","options","(","dict",")",":","User","model","options","."]
docstr: Trains a BIST model on an annotated dataset in CoNLL file format.
  
  Args:
      dataset (str): Path to input dataset for training, formatted in CoNLL/U format.
      epochs (int, optional): Number of learning iterations.
      dev (str, optional): Path to development dataset for conducting evaluations.
docstr_tok: ["Trains","a","BIST","model","on","an","annotated","dataset","in","CoNLL","file","format",".","Args",":","dataset","(","str",")",":","Path","to","input","dataset","for","training",",","formatted","in","CoNLL\/U","format",".","epochs","(","int",",","optional",")",":","Number","of","learning","iterations",".","dev","(","str",",","optional",")",":","Path","to","development","dataset","for","conducting","evaluations","."]
code: def fit(self, dataset, epochs=10, dev=None):
      """
      Trains a BIST model on an annotated dataset in CoNLL file format.
  
      Args:
          dataset (str): Path to input dataset for training, formatted in CoNLL/U format.
          epochs (int, optional): Number of learning iterations.
          dev (str, optional): Path to development dataset for conducting evaluations.
      """
      if dev:
          dev = validate_existing_filepath(dev)
      dataset = validate_existing_filepath(dataset)
      validate((epochs, int, 0, None))
  
      print("\nRunning fit on " + dataset + "...\n")
      words, w2i, pos, rels = utils.vocab(dataset)
      self.params = words, w2i, pos, rels, self.options
  
      from nlp_architect.models.bist.mstlstm import MSTParserLSTM
  
      self.model = MSTParserLSTM(*self.params)
  
      for epoch in range(epochs):
          print("Starting epoch", epoch + 1)
          self.model.train(dataset)
          if dev:
              ext = dev.rindex(".")
              res_path = (
                  dev[:ext]
                  + "_epoch_"
                  + str(epoch + 1)
                  + "_pred"
                  + dev[ext:]
              )
              utils.write_conll(res_path, self.model.predict(dev))
              utils.run_eval(dev, res_path)
  
file_path: nlp-architect/nlp_architect/models/bist_parser.py
imports: import json
  import os
  from nlp_architect.models.bist import utils
  from nlp_architect.models.bist.utils import get_options_dict
  from nlp_architect.utils.io import validate, validate_existing_filepath
label_desc: Use image node_id 2 for calling the BISTModel obj's underlying member method code with example usage: obj.fit(dataset, epochs, dev) without return types