class_docstr: Datasets for neural machine translation on French / English bilingual datasets.
  Available at http://www-lium.univ-lemans.fr/~schwenk/cslm_joint_paper/data/bitexts.tgz
  
  Arguments:
      time_steps (int) : Length of a sequence.
      path (str) : Path to text file.
      tokenizer (function) : Tokenizer function.
      onehot_input (boolean): One-hot representation of input
      get_prev_target (boolean): for sequence to sequence models, set to
                             True for training data to provide correct
                             target from previous time step as decoder
                             input. If condition, shape will be a tuple
                             of shapes, corresponding to encoder and
                             decoder inputs.
      split (str): "train" or "valid" split of the dataset
      dataset (str): 'un2000' for the United Nations dataset or 'eurparl7'
                     for the European Parliament datset.
      subset_pct (float): Percentage of the dataset to use (100 is the full dataset)
class_docstr_tok: ["Datasets","for","neural","machine","translation","on","French","\/","English","bilingual","datasets",".","Available","at","http",":","\/\/www-lium.univ-lemans.fr\/~schwenk\/cslm_joint_paper\/data\/bitexts.tgz","Arguments",":","time_steps","(","int",")",":","Length","of","a","sequence",".","path","(","str",")",":","Path","to","text","file",".","tokenizer","(","function",")",":","Tokenizer","function",".","onehot_input","(","boolean",")",":","One-hot","representation","of","input","get_prev_target","(","boolean",")",":","for","sequence","to","sequence","models",",","set","to","True","for","training","data","to","provide","correct","target","from","previous","time","step","as","decoder","input",".","If","condition",",","shape","will","be","a","tuple","of","shapes",",","corresponding","to","encoder","and","decoder","inputs",".","split","(","str",")",":","``","train","''","or","``","valid","''","split","of","the","dataset","dataset","(","str",")",":","'un2000","'","for","the","United","Nations","dataset","or","'eurparl7'","for","the","European","Parliament","datset",".","subset_pct","(","float",")",":","Percentage","of","the","dataset","to","use","(","100","is","the","full","dataset",")"]
docstr: Load French and English sentence data from file.
docstr_tok: ["Load","French","and","English","sentence","data","from","file","."]
code: def __init__(
      self,
      time_steps,
      path,
      tokenizer=None,
      onehot_input=False,
      get_prev_target=False,
      split=None,
      dataset="un2000",
      subset_pct=100,
  ):
      """
      Load French and English sentence data from file.
      """
      assert dataset in ("europarl7", "un2000"), "invalid dataset"
      processed_file = os.path.join(path, dataset + "-" + split + ".h5")
      assert os.path.exists(processed_file), (
          "Dataset at '" + processed_file + "' not found"
      )
      self.subset_pct = subset_pct
  
      super(TextNMT, self).__init__(
          time_steps,
          processed_file,
          vocab=None,
          tokenizer=tokenizer,
          onehot_input=onehot_input,
          get_prev_target=get_prev_target,
          reverse_target=True,
      )
  
imports: import logging
  import numpy
  import os
  import h5py
  from neon.data.dataiterator import NervanaDataIterator, ArrayIterator
  from neon.data.datasets import Dataset
  from neon.data.text_preprocessing import pad_sentences, pad_data
label_desc: Use image node_id 1 to create a new TextNMT object from inherited base classes: Text with example: obj = TextNMT(time_steps, path, tokenizer, onehot_input, get_prev_target, split, dataset, subset_pct)