private DataFrame toDataFrame(JavaSparkContext jsc,List<DependencyGraph> graphs,FeatureFrame featureFrame){
  List<ParsingContext> list=new ArrayList<ParsingContext>();
  for (  DependencyGraph graph : graphs) {
    List<ParsingContext> xy=TransitionDecoder.decode(graph,featureFrame);
    list.addAll(xy);
  }
  JavaRDD<ParsingContext> javaRDD=jsc.parallelize(list);
  return sqlContext.createDataFrame(javaRDD,ParsingContext.class);
}

private DataFrame toDataFrame ( JavaSparkContext jsc , List < DependencyGraph > graphs , FeatureFrame featureFrame ) { List < ParsingContext > list = new ArrayList < ParsingContext > ( ) ; for ( DependencyGraph graph : graphs ) { List < ParsingContext > xy = TransitionDecoder . decode ( graph , featureFrame ) ; list . addAll ( xy ) ; } JavaRDD < ParsingContext > javaRDD = jsc . parallelize ( list ) ; return sqlContext . createDataFrame ( javaRDD , ParsingContext . class ) ; }
converts a list of dependency graphs to a data frame .
