Examples of LookupHit


Examples of org.apache.ctakes.dictionary.lookup.vo.LookupHit

                            else
                            {
                                endOffset = firstWordLookupToken.getEndOffset();
                            }

                            LookupHit lh = new LookupHit(
                                    mdh,
                                    startOffset,
                                    endOffset);

                            lhList.add(lh);
View Full Code Here

Examples of org.apache.ctakes.dictionary.lookup.vo.LookupHit

            {
                Iterator mdhMatchItr = mdhCol.iterator();
                while (mdhMatchItr.hasNext())
                {
                    MetaDataHit mdh = (MetaDataHit) mdhMatchItr.next();
                    LookupHit lh = new LookupHit(mdh, lt.getStartOffset(), lt
                            .getEndOffset());
                    lhList.add(lh);
                }
            }
        }
View Full Code Here

Examples of org.apache.ctakes.dictionary.lookup.vo.LookupHit

    // val = Set of LookupHit objects corresponding to begin,end
    Map m = new HashMap();

    while (lhItr.hasNext())
    {
      LookupHit lh = (LookupHit) lhItr.next();
      String keyStr = getKeyString(lh.getStartOffset(), lh.getEndOffset());

      Set s = null;
      if (m.containsKey(keyStr))
      {
        s = (Set) m.get(keyStr);
View Full Code Here

Examples of org.apache.ctakes.dictionary.lookup.vo.LookupHit

        Iterator lhAtOffsetItr = hitsAtOffsetCol.iterator();
        int neBegin = -1;
        int neEnd = -1;
        while (lhAtOffsetItr.hasNext())
        {
          LookupHit lh = (LookupHit) lhAtOffsetItr.next();
          neBegin = lh.getStartOffset();
          neEnd = lh.getEndOffset();

          MetaDataHit mdh = lh.getDictMetaDataHit();
          String cui = mdh.getMetaFieldValue(props.getProperty(CUI_MF_PRP_KEY));
          String tui = mdh.getMetaFieldValue(props.getProperty(TUI_MF_PRP_KEY));
                   
          //String text = lh.getDictMetaDataHit().getMetaFieldValue("text");
          if (validTuiSet.contains(tui))
View Full Code Here

Examples of org.apache.ctakes.dictionary.lookup.vo.LookupHit

      int neBegin = -1;
      int neEnd = -1;
      Collection validCodeCol = new HashSet();
      while (lhAtOffsetItr.hasNext())
      {
        LookupHit lh = (LookupHit) lhAtOffsetItr.next();
        neBegin = lh.getStartOffset();
        neEnd = lh.getEndOffset();

        String text = jcas.getDocumentText().substring(
            lh.getStartOffset(),
            lh.getEndOffset());
        text = text.trim().toLowerCase();

        MetaDataHit mdh = lh.getDictMetaDataHit();
        String code = mdh.getMetaFieldValue(iv_props.getProperty(CODE_MF_PRP_KEY));

        if (isValid("trade_name", text) || isValid("ingredient", text))
        {
          validCodeCol.add(code);
View Full Code Here

Examples of org.apache.ctakes.dictionary.lookup.vo.LookupHit

  private int countUniqueCodes(Collection hitsAtOffset) {
    Iterator lhAtOffsetItr = hitsAtOffset.iterator();
    Set<String> codes = new HashSet<String>();
    while (lhAtOffsetItr.hasNext())
    {
      LookupHit lh = (LookupHit) lhAtOffsetItr.next();

      MetaDataHit mdh = lh.getDictMetaDataHit();

      String code = mdh.getMetaFieldValue(iv_props.getProperty(CODE_MF_PRP_KEY));
      if (codes.contains(code)) {
        // don't create a second entry in the array for a code already seen, including null
      } else {
View Full Code Here

Examples of org.apache.ctakes.dictionary.lookup.vo.LookupHit

      int neBegin = -1;
      int neEnd = -1;
      Set<String> codes = new HashSet<String>();
      while (lhAtOffsetItr.hasNext())
      {
        LookupHit lh = (LookupHit) lhAtOffsetItr.next();
        neBegin = lh.getStartOffset();
        neEnd = lh.getEndOffset();

        MetaDataHit mdh = lh.getDictMetaDataHit();

        String code = mdh.getMetaFieldValue(iv_props.getProperty(CODE_MF_PRP_KEY));
        if (codes.contains(code)) {
          // don't create a second entry in the array for a code already seen, including null
        } else {
View Full Code Here

Examples of org.apache.ctakes.dictionary.lookup.vo.LookupHit

  {
    List l = new ArrayList();
    Iterator itr = lookupHitCol.iterator();
    while (itr.hasNext())
    {
      LookupHit lh = (LookupHit) itr.next();
      if (!isDuplicate(lh))
      {
        l.add(lh);
      }
    }
View Full Code Here

Examples of org.apache.ctakes.dictionary.lookup.vo.LookupHit

  {
    List<LookupHit> l = new ArrayList<>();
    Iterator<LookupHit> itr = lookupHitCol.iterator();
    while (itr.hasNext())
    {
      LookupHit lh = itr.next();
      if (!isDuplicate(lh))
      {
        l.add(lh);
      }
    }
View Full Code Here

Examples of org.apache.ctakes.dictionary.lookup.vo.LookupHit

            {
                Iterator<MetaDataHit> mdhMatchItr = mdhCol.iterator();
                while (mdhMatchItr.hasNext())
                {
                    MetaDataHit mdh = mdhMatchItr.next();
                    LookupHit lh = new LookupHit(mdh, lt.getStartOffset(), lt
                            .getEndOffset());
                    lhList.add(lh);
                }
            }
        }
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.