Examples of Hit

  • es.mahulo.battleship.model.Hit
  • net.paoding.analysis.dictionary.Hit
    Hit是检索字典时返回的结果。检索字典时,总是返回一个非空的Hit对象表示可能的各种情况。

    Hit对象包含2类判断信息:

  • 要检索的词语是否存在于词典中: {@link #isHit()}
  • 词典是否含有以给定字符串开头的其他词语: {@link #isUnclosed()}

  • 如果上面2个信息都是否定的,则 {@link #isUndefined()}返回true,否则返回false.

    如果 {@link #isHit()}返回true,则 {@link #getWord()}返回查找结果, {@link #getNext()}返回下一个词语。
    如果 {@link #isHit()}返回false,但 {@link #isUnclosed()}返回true, {@link #getNext()}返回以所查询词语开头的位置最靠前的词语。

    @author Zhiliang Wang [qieqie.wang@gmail.com] @see Dictionary @see BinaryDictionary @see HashBinaryDictionary @since 1.0

  • net.sf.katta.lib.lucene.Hit
    Note: this class has a natural ordering that is inconsistent with equals.
  • org.apache.camel.processor.lucene.support.Hit
  • org.apache.lucene.search.Hit
    Wrapper used by {@link HitIterator} to provide a lazily loaded hitfrom {@link Hits}. @author Jeremy Rayner
  • org.apache.nutch.searcher.Hit
    A document which matched a query in an index.
  • org.encuestame.persistence.domain.Hit
    Hits. @author Morales, Diana Paola paolaATencuestame.org @since September 08, 2011
  • org.jayasoft.woj.common.model.search.Hit
  • org.opensolaris.opengrok.egrok.model.Hit
  • org.opensolaris.opengrok.search.Hit
    The hit class represents a single search hit @author Trond Norbye
  • org.vosao.search.Hit
  • org.watermint.sourcecolon.org.opensolaris.opengrok.search.Hit
    The hit class represents a single search hit @author Trond Norbye
  • org.wltea.analyzer.dic.Hit
    IK Analyzer v3.2 表示词典检索的命中结果 @author 林良益

  • Examples of RoFParser.AType.Hit

        public static ArrayList<DBHit> GetHits(RoFParser.Mission mission)
        {
            ArrayList<DBHit> hitEvents = new ArrayList<DBHit>();
           
            ArrayList<Hit> hEvents = mission.getHits();
            Hit hit;
            int i = 1;
           
            Iterator<Hit> hitit = hEvents.iterator();
            while (hitit.hasNext())
            {
                hit = hitit.next();
               
                //add hit
                DBHit tmpHit = new DBHit(i, mission.getMissionID(),
                        hit.getAttackerID(), hit.getTargetID(), hit.getTick(), hit.getAmmo());
                hitEvents.add(tmpHit);
                i++;
            }
           
            return hitEvents;
    View Full Code Here

    Examples of com.eclipsesource.tabris.tracking.internal.analytics.model.hit.Hit

        ArgumentCaptor<Hit> hitCaptor = ArgumentCaptor.forClass( Hit.class );
        ArgumentCaptor<AdvancedConfiguration> configCaptor = ArgumentCaptor.forClass( AdvancedConfiguration.class );
        verify( analytics, times( 2 ) ).track( hitCaptor.capture(), eq( "clientId" ), configCaptor.capture() );
        assertAdvancedConfiguration( configCaptor.getAllValues().get( 0 ) );
        Hit transactionHit = hitCaptor.getAllValues().get( 0 );
        Hit itemHit = hitCaptor.getAllValues().get( 1 );
        verifyTransactionHit( order, transactionHit );
        verifyItemHit( order, itemHit );
      }
    View Full Code Here

    Examples of com.eclipsesource.tabris.tracking.internal.analytics.model.hit.Hit

    public class HitTest {

      @Test( expected = IllegalArgumentException.class )
      public void testFailsWithNullType() {
        new Hit( null );
      }
    View Full Code Here

    Examples of com.eclipsesource.tabris.tracking.internal.analytics.model.hit.Hit

        new Hit( null );
      }

      @Test( expected = IllegalArgumentException.class )
      public void testFailsWithEmptyType() {
        new Hit( "" );
      }
    View Full Code Here

    Examples of com.eclipsesource.tabris.tracking.internal.analytics.model.hit.Hit

        new Hit( "" );
      }

      @Test
      public void testParameterAreNotNull() {
        Hit hit = new Hit( "foo" );

        Map<String, Object> parameter = hit.getParameter();

        assertNotNull( parameter );
      }
    View Full Code Here

    Examples of com.eclipsesource.tabris.tracking.internal.analytics.model.hit.Hit

        assertNotNull( parameter );
      }

      @Test
      public void testAddsTypeToParameter() {
        Hit hit = new Hit( "foo" );

        Map<String, Object> parameter = hit.getParameter();

        Object type = parameter.get( RequestKeyProvider.getRequestKey( RequestKeys.HIT_TYPE ) );
        assertEquals( "foo", type );
      }
    View Full Code Here

    Examples of com.sohospace.dictionary.Hit

      protected void collect(Collector collector, CharSequence beaf, int offset,
          int end, String word) {
        super.collect(collector, beaf, offset, end, word);
        if (units != null) {
          Hit wd;
          int i = end + 1;
          while (i <= beaf.length()
              && (wd = units.search(beaf, end, i - end)).isHit()) {
            collector.collect(word + beaf.subSequence(end, i), offset, i);
            end++;
            if (!wd.isUnclosed()) {
              break;
            }
            i++;
          }
        }
    View Full Code Here

    Examples of com.sohospace.dictionary.Hit

        int identifiedEnd = offset;
        // ���ڶ�λδ�ִܷʵĿ�Ŀ�ʼλ�ã�e.g '��'
        int unidentifiedIndex = -1;
        //���ڸ����ж��Ƿ����shouldAWord()����
        int maxWordLength = 0;
        Hit word = null;
        for (setup = offset, end = offset; setup < beaf.length()
            && CharSet.isCjkUnifiedIdeographs(beaf.charAt(setup)); end = ++setup) {
          for (int count = 1; end < beaf.length()
              && CharSet.isCjkUnifiedIdeographs(beaf.charAt(end++)); count++) {
            //��һ��forѭ��ʱ��end=setup+1
            word = vocabulary.search(beaf, setup, count);
            if (word.isUndefined()) {
              if (unidentifiedIndex < 0 && setup >= identifiedEnd) {
                unidentifiedIndex = setup;
              }
              break;
            } else if (word.isHit()) {
              if (identifiedEnd < end) {
                identifiedEnd = end;
              }
              if (unidentifiedIndex >= 0) {
                dissectUnidentified(collector, beaf, unidentifiedIndex,
                    setup - unidentifiedIndex);
                unidentifiedIndex = -1;
              }
              collector.collect(word.getWord(), setup, end);
              if (setup == offset && maxWordLength < count) {
                maxWordLength = count;
              }
              if (!(word.isUnclosed() && end < beaf.length()// ����ж���Ϊ�����жϷ���
              && beaf.charAt(end) >= word.getNext().charAt(count))) {
                break;
              }
            }
          }
        }
    View Full Code Here

    Examples of com.sohospace.dictionary.Hit

       * @param count
       */
      protected void dissectUnidentified(Collector collector, CharSequence beaf,
          int offset, int count) {
        int end = offset + count;
        Hit word = null;
        int nearEnd = end - 1;
        for (int i = offset, j=i; i < end;) {
          j = skipXword(beaf, i, end);
          if (j >= 0 && i != j) {
            i = j;
            continue;
          }
          j = collectNumber(collector, beaf, i, end);
          if (j >= 0 && i != j) {
            i = j;
            continue;
          }
          word = factory.getXchars().search(beaf, i, 1);
          if (word.isHit()) {
            i++;
            continue;
          }
          // ͷ��
          if (i == offset) {
    View Full Code Here

    Examples of com.sohospace.dictionary.Hit

          int offset, int end) {
        collector.collect(beaf.subSequence(offset, end).toString(), offset, end);
      }

      private final int skipXword(CharSequence beaf, int offset, int end) {
        Hit word;
        for (int k = offset + 2; k <= end; k++) {
          word = factory.getXwords().search(beaf, offset, k - offset);
          if (word.isHit()) {
            offset = k;
          }
          if (word.isUndefined() || !word.isUnclosed()) {
            break;
          }
        }
        return offset;
      }
    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.