All Downloads are FREE. Search and download functionalities are using the official Maven repository.

biz.neumann.ocr.Line.scala Maven / Gradle / Ivy

The newest version!
package biz.neumann.ocr

import xml.NodeSeq

/**
 * AN-iT
 * Andreas Neumann
 * [email protected]
 * http://www.an-it.com
 * Date: 22.11.11
 * Time: 12:36
 */

case class Line( coordinates: Coordinates,
                 val words: Words,
                 val enclosingPageNumber: Option[Int] = None
               ) extends Element with IndexedSeq[Word]{

  def toText: String = words.map(_.text).mkString(" ")

  def toHTML(zoom: Double = 1) : NodeSeq =
     ++
      words.flatMap(_.toHTML())

  def length = words.length

  def apply(idx : Int) = words.apply(idx)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy