<commit_before>//--------------------------------------
//
// SilkFlow.scala
// Since: 2013/05/08 2:18 PM
//
//--------------------------------------

package xerial.silk.core

import java.io.File
import reflect.ClassTag
import xerial.core.log.Logger
import xerial.core.io.text.UString
import reflect.macros.Context
import scala.language.experimental.macros

/**
 * Base trait for representing an arrow from a data type to another data type
 * @tparam P previous type
 * @tparam A current type
 */
abstract class SilkFlow[P, A] extends Silk[A] {

  import SilkFlow._

  def self = this

  protected def err = sys.error("N/A")

//  def size = 0
//  def isSingle = false
//  def isEmpty = false
//  def sum[B >: A](implicit num: Numeric[B]) = Fold(self, num.zero, num.plus)
//  def product[B >: A](implicit num: Numeric[B]) = Fold(self, num.one, num.times)
//  def min[B >: A](implicit cmp: Ordering[B]) = Reduce(self, (x: A, y: A) => if (cmp.lteq(x, y)) x else y)
//  def max[B >: A](implicit cmp: Ordering[B]) = Reduce(self, (x: A, y: A) => if (cmp.gteq(x, y)) x else y)
//  def maxBy[B](f: (A) => B)(implicit cmp: Ordering[B]) = Reduce(self, (x: A, y: A) => if (cmp.gteq(f(x), f(y))) x else y)
//  def minBy[B](f: (A) => B)(implicit cmp: Ordering[B]) = Reduce(self, (x: A, y: A) => if (cmp.lteq(f(x), f(y))) x else y)
//  //  def mkString(start: String, sep: String, end: String) =
//  //    FlowMap[A, String](self, _.toString).aggregate(new StringBuilder)(
//  //    {
//  //      (b, a) =>
//  //        if (!b.isEmpty)
//  //          b.append(sep)
//  //        b.append(a)
//  //        b
//  //    }, {
//  //      (b1, b2) =>
//  //        if (!b1.isEmpty)
//  //          b1.append(sep)
//  //        b1.append(b2.result())
//  //        b1
//  //    }).mapSingle {
//  //      s =>
//  //        val b = new StringBuilder
//  //        b.append(start)
//  //        b.append(s)
//  //        b.append(end)
//  //        b.result
//  //    }
//
//  def groupBy[K](f: (A) => K) = GroupBy(self, f)
//  def project[B](implicit mapping: ObjectMapping[A, B]) = Project(self, mapping)
//  def join[K, B](other: Silk[B], k1: (A) => K, k2: (B) => K) = Join(self, other, k1, k2)
//  def joinBy[B](other: Silk[B], cond: (A, B) => Boolean) = JoinBy(self, other, cond)
//  def sortBy[K](f: (A) => K)(implicit ord: Ordering[K]) = SortBy(self, f, ord)
//  def sorted[A1 >: A](implicit ord: Ordering[A1]) = Sort(self, ord)
//  def takeSample(proportion: Double) = Sampling(self, proportion)
//  def withFilter(p: (A) => Boolean) = WithFilter(self, p)
//  def zip[B](other: Silk[B]) = Zip(self, other)
//  def zipWithIndex = ZipWithIndex(self)
//
//  def split: Silk[Silk[A]] = Split(self)
//
//  // Type conversion method
//  def toArray[B >: A : ClassTag]: Array[B] = null
//
//  def save[B >: A]: Silk[B] = err // SaveToFile(self)<commit_msg>Reoved SilkFlow implementation because it has moved to SilkOps<commit_after>//--------------------------------------
//
// SilkFlow.scala
// Since: 2013/05/08 2:18 PM
//
//--------------------------------------

package xerial.silk.core

import java.io.File
import reflect.ClassTag
import xerial.core.log.Logger
import xerial.core.io.text.UString
import reflect.macros.Context
import scala.language.experimental.macros

/**
 * Base trait for representing an arrow from a data type to another data type
 * @tparam P previous type
 * @tparam A current type
 */
abstract class SilkFlow[P, A] extends Silk[A] {

  import SilkFlow._

  def self = this

  protected def err = sys.error("N/A")
{'fraction_non_alphanumeric': 0.23092198581560283, 'fraction_numerical': 0.010212765957446808, 'mean_word_length': 2.2437902483900642, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3016007', 'n_tokens_mistral': 1337, 'n_tokens_neox': 1302, 'n_words': 338}