Examples of Document


Examples of edu.stanford.nlp.dcoref.Document

      // this is created for each new annotation because it is not threadsafe
      RuleBasedCorefMentionFinder finder = new RuleBasedCorefMentionFinder(allowReparsing);
      List<List<Mention>> allUnprocessedMentions = finder.extractPredictedMentions(annotation, 0, corefSystem.dictionaries());

      // add the relevant info to mentions and order them for coref
      Document document = mentionExtractor.arrange(annotation, sentences, trees, allUnprocessedMentions);
      List<List<Mention>> orderedMentions = document.getOrderedMentions();
      if(VERBOSE){
        for(int i = 0; i < orderedMentions.size(); i ++){
          System.err.printf("Mentions in sentence #%d:\n", i);
          for(int j = 0; j < orderedMentions.get(i).size(); j ++){
            System.err.println("\tMention #" + j + ": " + orderedMentions.get(i).get(j).spanToString());
View Full Code Here

Examples of edu.ucla.sspace.text.Document

        long processStart = System.currentTimeMillis();
        int count = 0;

        while (docIter.hasNext()) {
            long startTime = System.currentTimeMillis();
            Document doc = docIter.next();
            int docNumber = ++count;
            int terms = 0;
            sspace.processDocument(doc.reader());
            long endTime = System.currentTimeMillis();
            verbose("processed document #%d in %.3f seconds",
                    docNumber, ((endTime - startTime) / 1000d));
        }
View Full Code Here

Examples of electric.xml.Document

    public Object getDocument(String url) throws FunctionCallException
    {
        try
        {
            return new Document( new File( url ) );
        }
        catch (ParseException e)
        {
            throw new FunctionCallException( e.getMessage() );
        }
View Full Code Here

Examples of elemental.dom.Document

  // For some reason it fails in HtmlUnit production mode. It also fails
  // in real browsers because of pop up blocker.
  @DoNotRunWith(Platform.Prod)
  public void testWrite() {
    final Window window = getWindow().open("about:blank", "_blank");
    final Document document = window.getDocument();
    document.write("<body>drink and drink and drink AND FIGHT</body>");
    assertTrue(document.getBody().getTextContent().indexOf("drink and drink and drink AND FIGHT") != -1);
  }
View Full Code Here

Examples of elemental.html.Document

    // Cleanup.
    detachElements(elems);
  }

  private Element[] createAndAttachElements(int count) {
    Document doc = Elements.getDocument();
    Element[] elems = new Element[count];
    for (int i = 0; i < count; i++) {
      Element elem = doc.createDivElement();
      doc.getBody().appendChild(elem);
      elems[i] = elem;
    }
    return elems;
  }
View Full Code Here

Examples of es.ipsa.atril.doc.user.Document

  public String incomingDeposits(AtrilSession oSes) {
    for (Document d : getDocument().children())
      if (d.type().name().equals("IncomingDeposits"))
        return d.id();
    Dms oDms = oSes.getDms();
    Document oDoc = oDms.newDocument(oDms.getDocumentType("IncomingDeposits"), getDocument());
    oDoc.save("");
    oSes.commit();
    return oDoc.id();
  }
View Full Code Here

Examples of fi.luomus.commons.xml.Document

  }
 
  @Override
  public Document getAsDocument(String resourcename) throws Exception {
    HttpGet request = new HttpGet(uri + "/" + resourcename);
    Document document = httpclient.contentAsDocument(request);
    return document;
  }
View Full Code Here

Examples of galoot.types.Document

    /**
     * Initialize the instance vars used in processing
     */
    private void init()
    {
        document = new Document();
        variableStack = new Stack<Object>();
        filterStack = new LinkedList<Pair<String, String>>();
        filterBlockData = new Stack<StringBuilder>();
        forLoopStack = new Stack<Map<String, Object>>();
    }
View Full Code Here

Examples of gate.Document

    FeatureMap docfeats = document.getFeatures();
    thefeats.putAll(docfeats);

    String theName = document.getName();
    // create a copy of the current document
    Document newDoc;
    try {
      newDoc = (Document) Factory.createResource(
              "gate.corpora.DocumentImpl",
              theparms,
              thefeats,
              theName+"_virtual");
    } catch (ResourceInstantiationException ex) {
      throw new GateRuntimeException(ex);
    }

    /* no forward annotation mappig yet ...
    if(annotatedDocumentTransformer.getGenerateForwardOffsetMap()) {
      annotatedDocumentTransformer.addForwardMappedAnnotations(
              document, newDoc,
              mapBackAnnotations);
    }
    */

    languageAnalyser.setDocument(newDoc);
    languageAnalyser.execute();

    if(annotatedDocumentTransformer.getGenerateBackwardOffsetMap()) {
      // figure out the annotation set names to map back
      List<String> effectiveMapFromAnnsetNames = new ArrayList<String>();
      if(mapBackAnnotations == null || mapBackAnnotations.size() == 0) {
        effectiveMapFromAnnsetNames.add("");
        Set<String> setnames = newDoc.getAnnotationSetNames();
        if(setnames != null) {
          for(String sn : setnames) {
            effectiveMapFromAnnsetNames.add(sn);
          }
        }
View Full Code Here

Examples of hu.jokeman.xparser.cldc11.document.nodes.Document

                    "Comments not allowed here.");
        }
    }
   
    public void createDocument () {
        _rootNode = new Document ();
        _currentNodes = new Stack ();
        push (_rootNode);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.