<commit_before>package renesca

import renesca.graph._
import renesca.helpers._
import renesca.parameter._
import renesca.parameter.implicits._
import renesca.table.Table

import scala.collection.mutable

case class QueryConfig(item: SubGraph, query: Query, callback: (Graph, Table) => Boolean = (graph: Graph, table: Table) => true)

class QueryBuilder {

  def randomVariable = "V" + java.util.UUID.randomUUID().toString.replace("-", "")

  private def selectLiteralMap(variable: String, properties: Properties, selection: Set[PropertyKey]) = {
    val remainingProperties = properties.filterKeys(!selection.contains(_))
    val selectedProperties = properties.filterKeys(selection.contains(_))
    val parameterMap = selectedProperties.toMap.map { case (k, v) => (PropertyKey(s"${ variable }_${ k }"), v) }
    val literalMap = selectedProperties.map { case (k, _) => s"$k: {${ variable }_${ k }}" }
    val literalMapMatcher = if(literalMap.isEmpty) "" else literalMap.mkString("{", ",", "}")<commit_msg>fix build<commit_after>package renesca

import renesca.graph._
import renesca.parameter._
import renesca.parameter.implicits._
import renesca.table.Table

import scala.collection.mutable

case class QueryConfig(item: SubGraph, query: Query, callback: (Graph, Table) => Boolean = (graph: Graph, table: Table) => true)

class QueryBuilder {

  def randomVariable = "V" + java.util.UUID.randomUUID().toString.replace("-", "")

  private def selectLiteralMap(variable: String, properties: Properties, selection: Set[PropertyKey]) = {
    val remainingProperties = properties.filterKeys(!selection.contains(_))
    val selectedProperties = properties.filterKeys(selection.contains(_))
    val parameterMap = selectedProperties.toMap.map { case (k, v) => (PropertyKey(s"${ variable }_${ k }"), v) }
    val literalMap = selectedProperties.map { case (k, _) => s"$k: {${ variable }_${ k }}" }
    val literalMapMatcher = if(literalMap.isEmpty) "" else literalMap.mkString("{", ",", "}")
{'fraction_non_alphanumeric': 0.1459486663311525, 'fraction_numerical': 0.0, 'mean_word_length': 5.3312101910828025, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '4614641', 'n_tokens_mistral': 582, 'n_tokens_neox': 584, 'n_words': 143}