Package edu.harvard.wcfia.yoshikoder.concordance

Examples of edu.harvard.wcfia.yoshikoder.concordance.ConcordanceLine


                String rhs = (String) iter.next();
                Token t = new TokenImpl(rhs, 0, 0);
                rl.add(t);
            }
            Token targ = new TokenImpl(target, 0, 0);
            ConcordanceLine line = new ConcordanceLineImpl(tl, targ, rl);
            clist.add(line);
        }
    }
View Full Code Here


    public Concordance getConcordance(){
      if (windowSize == -1){
        // not specified - we have to guess it.
        int max = 0;
        for (Iterator iter = clist.iterator(); iter.hasNext();) {
        ConcordanceLine line = (ConcordanceLine) iter.next();
        int m = Math.max(line.getLeftHandSide().size(),
                 line.getRightHandSide().size());
        if (m > max)
          max = m;
      }
        windowSize = max;
      }
     
        conc = new ConcordanceImpl(windowSize);
      for (Iterator iter = clist.iterator(); iter.hasNext();) {
      ConcordanceLine line = (ConcordanceLine) iter.next();
      conc.addLine(line);
    }
      return conc;
    }
View Full Code Here

TOP

Related Classes of edu.harvard.wcfia.yoshikoder.concordance.ConcordanceLine

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.