Package edu.stanford.nlp.trees.international.french

Examples of edu.stanford.nlp.trees.international.french.FrenchXMLTreeReaderFactory


    super();

    //Need to use a MemoryTreebank so that we can compute gross corpus
    //stats for MWE pre-processing
    // The treebank may be reset if setOptions changes CC_TAGSET
    treebank = new MemoryTreebank(new FrenchXMLTreeReaderFactory(CC_TAGSET), FrenchTreebankLanguagePack.FTB_ENCODING);
    treeFileExtension = "xml";
  }
View Full Code Here


      String splitFileName = opts.getProperty(ConfigParser.paramSplit);
      splitSet = makeSplitSet(splitFileName);
    }

    CC_TAGSET = PropertiesUtils.getBool(opts, ConfigParser.paramCCTagset, false);
    treebank = new MemoryTreebank(new FrenchXMLTreeReaderFactory(CC_TAGSET), FrenchTreebankLanguagePack.FTB_ENCODING);

    if(lexMapper == null) {
      lexMapper = new DefaultMapper();
      lexMapper.setup(null, lexMapOptions.split(","));
    }
View Full Code Here

  static Map<String, Tree> readTrees(String[] filenames)
    throws IOException
  {
    // TODO: perhaps we can just pass in CC_TAGSET and get rid of replacePOSTags
    // need to test that
    final TreeReaderFactory trf = new FrenchXMLTreeReaderFactory(false);
    Map<String, Tree> treeMap = Generics.newHashMap();
    for (String filename : filenames) {
      File file = new File(filename);
      String canonicalFilename =
        file.getName().substring(0, file.getName().lastIndexOf('.'));

      FrenchXMLTreeReader tr = (FrenchXMLTreeReader)
        trf.newTreeReader(new BufferedReader
                          (new InputStreamReader
                           (new FileInputStream(file),"ISO8859_1")));

      Tree t = null;
      int numTrees;
View Full Code Here

  public MemoryTreebank memoryTreebank() {
    return new MemoryTreebank(treeReaderFactory(), inputEncoding);
  }

  public TreeReaderFactory treeReaderFactory() {
    return (readPennFormat) ? new FrenchTreeReaderFactory() : new FrenchXMLTreeReaderFactory(false);
  }
View Full Code Here

TOP

Related Classes of edu.stanford.nlp.trees.international.french.FrenchXMLTreeReaderFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.