Examples of Span


Examples of net.xoetrope.builder.w3c.html.tags.Span

      htmlTags.put( HTML.Tag.PRE, new XFormatTagHandler( HTML.Tag.PRE ));
      htmlTags.put( HTML.Tag.SAMP, new XFormatTagHandler( HTML.Tag.SAMP ));
      htmlTags.put( HTML.Tag.SCRIPT, new Script());
      htmlTags.put( HTML.Tag.SELECT, new Select());
      htmlTags.put( HTML.Tag.SMALL, new XFormatTagHandler( HTML.Tag.SMALL ));
      htmlTags.put( HTML.Tag.SPAN, new Span());
      htmlTags.put( HTML.Tag.STRIKE, new XFormatTagHandler( HTML.Tag.STRIKE ));
      htmlTags.put( HTML.Tag.S, new XFormatTagHandler( HTML.Tag.S ));
      htmlTags.put( HTML.Tag.STRONG, new XFormatTagHandler( HTML.Tag.STRONG ));
      htmlTags.put( HTML.Tag.STYLE, new Style());
      htmlTags.put( HTML.Tag.SUB, new XFormatTagHandler( HTML.Tag.SUB ));
View Full Code Here

Examples of opennlp.tools.util.Span

        }

        List<LocationOccurrence> nerResults = new ArrayList<LocationOccurrence>();

        // The values used in these Spans are string character offsets
        Span sentenceSpans[] = sentenceDetector.sentPosDetect(plainText);

        // Each sentence gets processed on its own
        for (Span sentenceSpan : sentenceSpans) {

            // find the start and end position of this sentence in the document
            String sentence = plainText.substring(sentenceSpan.getStart(), sentenceSpan.getEnd());

            // tokenize the text into the required OpenNLP format
            String[] tokens = tokenizer.tokenize(sentence);

            //the values used in these Spans are string character offsets of each token from the sentence beginning
            Span[] tokenPositionsWithinSentence = tokenizer.tokenizePos(sentence);

            // find the location names in the tokenized text
            // the values used in these Spans are NOT string character offsets, they are indices into the 'tokens' array
            Span names[] = nameFinder.find(tokens);


            //for each name that got found, create our corresponding occurrence
            for (Span name : names) {
View Full Code Here

Examples of org.apache.accumulo.cloudtrace.instrument.Span

            count += list.size();
          }
          String msg = "sending " + String.format("%,d", count) + " mutations to " + String.format("%,d", mutationBatch.size()) + " tablets at " + location;
          Thread.currentThread().setName(msg);
         
          Span span = Trace.start("sendMutations");
          try {
            long st1 = System.currentTimeMillis();
            failures = sendMutationsToTabletServer(location, mutationBatch);
            long st2 = System.currentTimeMillis();
            if (log.isTraceEnabled())
              log.trace("sent " + String.format("%,d", count) + " mutations to " + location + " in "
                  + String.format("%.2f secs (%,.2f mutations/sec) with %,d failures", (st2 - st1) / 1000.0, count / ((st2 - st1) / 1000.0), failures.size()));
           
            long successBytes = 0;
            for (Entry<KeyExtent,List<Mutation>> entry : mutationBatch.entrySet()) {
              for (Mutation mutation : entry.getValue()) {
                successBytes += mutation.estimatedMemoryUsed();
              }
            }
           
            if (failures.size() > 0) {
              failedMutations.add(failures);
              successBytes -= failures.getMemoryUsed();
            }
           
            updateSendStats(count, st2 - st1);
            decrementMemUsed(successBytes);
           
          } finally {
            span.stop();
          }
        } catch (IOException e) {
          if (log.isTraceEnabled())
            log.trace("failed to send mutations to " + location + " : " + e.getMessage());
         
View Full Code Here

Examples of org.apache.accumulo.trace.instrument.Span

    timer.incrementStatusMinor();
   
    long count = 0;
   
    try {
      Span span = Trace.start("write");
      count = memTable.getNumEntries();
     
      DataFileValue dfv = null;
      if (mergeFile != null)
        dfv = datafileManager.getDatafileSizes().get(mergeFile);
     
      MinorCompactor compactor = new MinorCompactor(conf, fs, memTable, mergeFile, dfv, tmpDatafile, acuTableConf, extent, mincReason);
      CompactionStats stats = compactor.call();
     
      span.stop();
      span = Trace.start("bringOnline");
      datafileManager.bringMinorCompactionOnline(tmpDatafile, newDatafile, mergeFile, new DataFileValue(stats.getFileSize(), stats.getEntriesWritten()),
          commitSession, flushId);
      span.stop();
      return new DataFileValue(stats.getFileSize(), stats.getEntriesWritten());
    } catch (RuntimeException E) {
      failed = true;
      throw E;
    } catch (Error E) {
View Full Code Here

Examples of org.apache.ctakes.coreference.eval.helpers.Span

          goldSpan2id.put(p[0], ++id);
          String[] s = p[0].split("[-:]");
          int[] a = new int[s.length];
          for (int i = 0; i < s.length; i++)
            a[i] = Integer.parseInt(s[i]);
          goldSpans.add(new Span(a));
        }
        if (!goldSpan2id.containsKey(p[1])){
          goldSpan2id.put(p[1], ++id);
          String[] s = p[1].split("[-:]");
          int[] a = new int[s.length];
          for (int i = 0; i < s.length; i++)
            a[i] = Integer.parseInt(s[i]);
          goldSpans.add(new Span(a));         
        }
        goldPairs.add(new int[]{goldSpan2id.get(p[0]), goldSpan2id.get(p[1])});
        //      ppt_arr.add(new int[]{span2id.get(p[0]), span2id.get(p[1])});
      }
      br.close();
View Full Code Here

Examples of org.apache.ctakes.relationextractor.knowtator.Span

      HashMap<String, String> entityTypes = XMLReader.getEntityTypes(document);
     
      for(Map.Entry<String, ArrayList<Span>> entry : entityMentions.entrySet()) {

        // for disjoint spans, just ignore the gap
        Span first = entry.getValue().get(0);
        Span last = entry.getValue().get(entry.getValue().size() - 1);
       
        EntityMention entityMention = new EntityMention(initView, first.start, last.end);
        entityMention.setTypeID(Mapper.getEntityTypeId(entityTypes.get(entry.getKey())));
        entityMention.setId(identifiedAnnotationId++);
        entityMention.setDiscoveryTechnique(CONST.NE_DISCOVERY_TECH_GOLD_ANNOTATION);
View Full Code Here

Examples of org.apache.ecs.html.Span

                .addElement(new IMG("pics/logo_smilehouse.gif"));

            TR topRow = new TR().addElement(logoCell).addElement(
                new TD().setBackground(TOPBAR_BG_IMAGE)).addElement(
                new TD().setBackground(TOPBAR_BG_IMAGE).setAlign(AlignType.RIGHT).addElement(
                    new Span().addElement("OpenSyncro " + OPENSYNCRO_VERSION).setClass("syncroTitle")));

            TR menuRow = new TR().setVAlign(AlignType.TOP).addElement(
                new TD().setBackground(MENU_BG_IMAGE).setVAlign(AlignType.BOTTOM).addElement(
                    menuBar)).addElement(
                new TD()
                    .setBackground(MENU_BG_IMAGE)
                    .setAlign(AlignType.RIGHT)
                    .setColSpan(2)
                    .addElement(
                        new Span().addElement(
                            new A("Login?logout=yes", "[" + labels.getLabel("logout") + "]")
                            .setTarget("_top")).setClass("syncroText")));

            Body body = new Body().addElement(new Table()
                .setWidth("100%")
View Full Code Here

Examples of org.apache.ecs.xhtml.span

     * @param initialChar
     * @return A span element.
     */
    private Element makeHeader( char initialChar )
    {
        span s = new span();
        s.setClass( "section" );
        s.addElement( "<a name='"+initialChar+"'>"+initialChar+"</a>" );

        return s;
    }
View Full Code Here

Examples of org.apache.fop.area.Span

     * @param mr  The main reference area
     */
    protected void renderMainReference(MainReference mr) {
        int saveIPPos = currentIPPosition;

        Span span = null;
        List spans = mr.getSpans();
        int saveBPPos = currentBPPosition;
        int saveSpanBPPos = saveBPPos;
        for (int count = 0; count < spans.size(); count++) {
            span = (Span) spans.get(count);
            for (int c = 0; c < span.getColumnCount(); c++) {
                NormalFlow flow = (NormalFlow) span.getNormalFlow(c);

                if (flow != null) {
                    currentBPPosition = saveSpanBPPos;
                    renderFlow(flow);
                    currentIPPosition += flow.getIPD();
                    currentIPPosition += mr.getColumnGap();
                }
            }
            currentIPPosition = saveIPPos;
            currentBPPosition = saveSpanBPPos + span.getHeight();
            saveSpanBPPos = currentBPPosition;
        }
        currentBPPosition = saveBPPos;
    }
View Full Code Here

Examples of org.apache.pivot.wtk.Span

                File selectedFile = selectedFiles.get(i);

                List<File> files = (List<File>)fileTableView.getTableData();
                int index = files.indexOf(selectedFile);
                if (index != -1) {
                    selectedRanges.add(new Span(index, index));
                }
            }

            updatingSelection = true;
            fileTableView.setSelectedRanges(selectedRanges);
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.