Examples of Hyphenation


Examples of org.apache.lucene.analysis.compound.hyphenation.Hyphenation

    return tree;
  }

  protected void decomposeInternal(final Token token) {
    // get the hyphenation points
    Hyphenation hyphens = hyphenator.hyphenate(token.termBuffer(), 0, token
        .termLength(), 1, 1);
    // No hyphen points found -> exit
    if (hyphens == null) {
      return;
    }

    final int[] hyp = hyphens.getHyphenationPoints();
    char[] lowerCaseTermBuffer=makeLowerCaseCopy(token.termBuffer());

    for (int i = 0; i < hyp.length; ++i) {
      int remaining = hyp.length - i;
      int start = hyp[i];
View Full Code Here

Examples of org.apache.lucene.analysis.compound.hyphenation.Hyphenation

  }

  @Override
  protected void decompose() {
    // get the hyphenation points
    Hyphenation hyphens = hyphenator.hyphenate(termAtt.buffer(), 0, termAtt.length(), 1, 1);
    // No hyphen points found -> exit
    if (hyphens == null) {
      return;
    }

    final int[] hyp = hyphens.getHyphenationPoints();

    for (int i = 0; i < hyp.length; ++i) {
      int remaining = hyp.length - i;
      int start = hyp[i];
      CompoundToken longestMatchToken = null;
View Full Code Here

Examples of org.apache.lucene.analysis.compound.hyphenation.Hyphenation

  }

  @Override
  protected void decompose() {
    // get the hyphenation points
    Hyphenation hyphens = hyphenator.hyphenate(termAtt.buffer(), 0, termAtt.length(), 1, 1);
    // No hyphen points found -> exit
    if (hyphens == null) {
      return;
    }

    final int[] hyp = hyphens.getHyphenationPoints();

    for (int i = 0; i < hyp.length; ++i) {
      int remaining = hyp.length - i;
      int start = hyp[i];
      CompoundToken longestMatchToken = null;
View Full Code Here

Examples of org.apache.lucene.analysis.compound.hyphenation.Hyphenation

  }

  @Override
  protected void decomposeInternal(final Token token) {
    // get the hyphenation points
    Hyphenation hyphens = hyphenator.hyphenate(token.buffer(), 0, token
        .length(), 1, 1);
    // No hyphen points found -> exit
    if (hyphens == null) {
      return;
    }

    final int[] hyp = hyphens.getHyphenationPoints();
    char[] lowerCaseTermBuffer=makeLowerCaseCopy(token.buffer());

    for (int i = 0; i < hyp.length; ++i) {
      int remaining = hyp.length - i;
      int start = hyp[i];
View Full Code Here

Examples of org.apache.poi.hwpf.model.Hyphenation

            int add = (int) ( percentage * newCHP.getHps() );
            newCHP.setHps( newCHP.getHps() + add );
            break;
        case 0x4e:
            // sprmCHresi -- 0x484e
            Hyphenation hyphenation = new Hyphenation(
                    (short) sprm.getOperand() );
            newCHP.setHresi( hyphenation );
            break;
      case 0x4f:
        newCHP.setFtcAscii ((short) sprm.getOperand());
View Full Code Here

Examples of org.apache.poi.hwpf.model.Hyphenation

    {
        this.field_2_hps = 20;
        this.field_8_cv = new Colorref();
        this.field_11_lidDefault = 0x0400;
        this.field_12_lidFE = 0x0400;
        this.field_20_hresi = new Hyphenation();
        this.field_23_shd = new ShadingDescriptor();
        this.field_24_brc = new BorderCode();
        this.field_36_fcPic = -1;
        this.field_40_hresiOld = new Hyphenation();
        this.field_42_dttmRMark = new DateAndTime();
        this.field_43_dttmRMarkDel = new DateAndTime();
        this.field_44_istd = 10;
        this.field_53_dttmPropRMark = new DateAndTime();
        this.field_58_dttmConflict = new DateAndTime();
View Full Code Here

Examples of org.apache.poi.hwpf.model.Hyphenation

            int add = (int) ( percentage * newCHP.getHps() );
            newCHP.setHps( newCHP.getHps() + add );
            break;
        case 0x4e:
            // sprmCHresi -- 0x484e
            Hyphenation hyphenation = new Hyphenation(
                    (short) sprm.getOperand() );
            newCHP.setHresi( hyphenation );
            break;
      case 0x4f:
        newCHP.setFtcAscii ((short) sprm.getOperand());
View Full Code Here

Examples of org.apache.poi.hwpf.model.Hyphenation

    {
        this.field_2_hps = 20;
        this.field_8_cv = new Colorref();
        this.field_11_lidDefault = 0x0400;
        this.field_12_lidFE = 0x0400;
        this.field_20_hresi = new Hyphenation();
        this.field_23_shd = new ShadingDescriptor();
        this.field_24_brc = new BorderCode();
        this.field_36_fcPic = -1;
        this.field_40_hresiOld = new Hyphenation();
        this.field_42_dttmRMark = new DateAndTime();
        this.field_43_dttmRMarkDel = new DateAndTime();
        this.field_44_istd = 10;
        this.field_53_dttmPropRMark = new DateAndTime();
        this.field_58_dttmConflict = new DateAndTime();
View Full Code Here

Examples of org.apache.poi.hwpf.model.Hyphenation

            int add = (int) ( percentage * newCHP.getHps() );
            newCHP.setHps( newCHP.getHps() + add );
            break;
        case 0x4e:
            // sprmCHresi -- 0x484e
            Hyphenation hyphenation = new Hyphenation(
                    (short) sprm.getOperand() );
            newCHP.setHresi( hyphenation );
            break;
      case 0x4f:
        newCHP.setFtcAscii ((short) sprm.getOperand());
View Full Code Here

Examples of org.axsl.hyphen.Hyphenation

        final int nonWordChars = actualWordStart - this.wordStart;
        // Extract the word that should be evaluated by the hyphenation system.
        final int wordSize = server.wordSize(this.currentChars, actualWordStart,
                language, country);
        // See if there are discretionary hyphenation points.
        Hyphenation hyph = null;
        try {
            hyph = server.hyphenate(this.currentChars, actualWordStart,
                    wordSize, language, country,
                    this.currentLineText.inlineHyphenationRemainCount(),
                    this.currentLineText.inlineHyphenationPushCount(), false);
        } catch (final HyphenationException e) {
            /* Log the exception and continue. */
            this.getLogger().error("Hyphenation error", e);
        }
        // If none, the word cannot be hyphenated.
        if (hyph == null) {
            return this.wordStart;
        }
        // Select a hyphenation point.
        final CharSequence wordToHyphenate = this.currentChars.subSequence(actualWordStart,
                actualWordStart + wordSize);
        final int index = selectDiscretionaryHyphenationPoint(
                this.currentLineText, wordToHyphenate, hyph);
        // If none fit, then the word cannot be hyphenated.
        if (index < 0) {
            return this.wordStart;
        }
        // Compute the number of characters that should be included.
        final int charsToInclude = hyph.getPoints()[index];
        // Add it and the non-word characters to the count to be returned.
        return this.wordStart + nonWordChars + charsToInclude;
    }
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.