winbhaskar.sight-client_0.22.0.1.1.source-code.Extensions.scala Maven / Gradle / Ivy
The newest version!
package sight.extensions
import sight.models.{Page, Error, Pages}
extension pageOps on (ps: Pages):
def allText: Seq[String] = ps.pages.map(_.recognizedText.map(_.text)).flatten
def allTextWithConfidenceGreaterThan(confidence: Double) =
ps.pages.map(_.recognizedText.filter(_.confidence > confidence).map(_.text)).flatten