Package edu.harvard.wcfia.yoshikoder.document

Examples of edu.harvard.wcfia.yoshikoder.document.DocumentList


        if ((doctitle == null) || doctitle.length()==0){
            throw new CommitException("Please give the document a title");
        }
       
        DocumentList dl = yoshikoder.getDocumentList();
        for (Iterator iter = dl.iterator(); iter.hasNext();) {
            YKDocument doc = (YKDocument) iter.next();
            if (doctitle.equals(doc.getTitle()))
                throw new CommitException("A document with this name already exists.  Please choose another");
        }
       
View Full Code Here


   
    public ComparisonPanel(Yoshikoder yk) {
        super();
        yoshikoder = yk;
       
        DocumentList dl = yk.getProject().getDocumentList();
        YKDocument[] docarray =
            (YKDocument[])dl.toArray(new YKDocument[dl.size()]);
        doc1combo = new JComboBox(docarray);
        doc2combo = new JComboBox(docarray);
       
        YKDocument doc = yoshikoder.getSelectedDocument();
        if (doc != null){
View Full Code Here

              cnode = (CategoryNode)n.getParent();
            final CategoryNode catnode = cnode;
           
            dworker = new DialogWorker(yoshikoder){
                protected void doWork() throws Exception {
                    DocumentList dl = new DocumentListImpl();
                    dl.add(doc1);
                    dl.add(doc2);

                    TokenizationCache tcache = yoshikoder.getTokenizationCache();
                    TokenList tl1 = tcache.getTokenList(doc1);
                    TokenList tl2 = tcache.getTokenList(doc2);
                    if (tl1 == null){
View Full Code Here

   
  }
 
  protected Object[][] run(){
    // do the analysis
    DocumentList list = new DocumentListImpl();
    for (int ii=0; ii<files.length; ii++){
      YKDocument doc = YKDocumentFactory.createYKDocument(files[ii]);
      list.add(doc);
    }
        return null;
    }
View Full Code Here

       
        row = sheet.createRow((short)4);
        setExcelValue(row, 0, "Documents:");
       
        int ii=5;
        DocumentList dl = getDocuments();
        for (Iterator iterator = dl.iterator(); iterator.hasNext();) {
            YKDocument d = (YKDocument) iterator.next();
            row = sheet.createRow((short)ii);
            setExcelValue(row, 0, d.getTitle());
            ii++;
        }
View Full Code Here

    }
   
    public static void main(String[] args) throws Exception{
        YKDocument d1 = YKDocumentFactory.createDummyDocument("D1", "Mary had a little lamb.  Mary had some more", "UTF-8");
        YKDocument d2 = YKDocumentFactory.createDummyDocument("D1", "Jackie had a little beef.  Jackie whined some more", "UTF-8");
        DocumentList dl = new DocumentListImpl();
        dl.add(d1);
        dl.add(d2);
        Tokenizer tok = new BITokenizerImpl();
        WordFrequencyMap wd1 = new WordFrequencyMap(tok.getTokens(d1.getText()));
        WordFrequencyMap wd2 = new WordFrequencyMap(tok.getTokens(d2.getText()));
        UnifiedDocumentFrequencyReport rep = new UnifiedDocumentFrequencyReport("title", "desc",
               dl, new WordFrequencyMap[]{wd1, wd2});
View Full Code Here

TOP

Related Classes of edu.harvard.wcfia.yoshikoder.document.DocumentList

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.