<commit_before>package example.tqa

import spacro.ui._

import turksem.qasrl.QASRLDispatcher
import qamr._
import turksem.util._

import japgolly.scalajs.react.vdom.html_<^._
import japgolly.scalajs.react._

import scalacss.DevDefaults._
import scalacss.ScalaCssReact._

import scalajs.js.JSApp

import upickle.default._

object Dispatcher extends QASRLDispatcher[TQASentenceId] with JSApp {

  val dataToggle = VdomAttr("data-toggle")
  val dataPlacement = VdomAttr("data-placement")

  val TooltipsComponent = ScalaComponent.builder[VdomTag]("Tooltips")
    .render(_.props)
    .componentDidMount(_ => Callback(scala.scalajs.js.Dynamic.global.$("[data-toggle=\"tooltip\"]").tooltip()))
    .build

  import settings._

  def example(question: String, answer: String, isGood: Boolean, tooltip: String = "") =
    <.li(
      <.span(
        if(isGood) Styles.goodGreen else Styles.badRed,
        TagMod(
          Styles.underlined,
          dataToggle := "tooltip",<commit_msg>Fix dispatcher and client sentence type in TQA project<commit_after>package example.tqa

import spacro.ui._

import turksem.qasrl.QASRLDispatcher
import qamr._
import turksem.util._

import japgolly.scalajs.react.vdom.html_<^._
import japgolly.scalajs.react._

import scalacss.DevDefaults._
import scalacss.ScalaCssReact._

import scalajs.js.JSApp

import upickle.default._

object Dispatcher extends QASRLDispatcher[SentenceId] with JSApp {

  val dataToggle = VdomAttr("data-toggle")
  val dataPlacement = VdomAttr("data-placement")

  val TooltipsComponent = ScalaComponent.builder[VdomTag]("Tooltips")
    .render(_.props)
    .componentDidMount(_ => Callback(scala.scalajs.js.Dynamic.global.$("[data-toggle=\"tooltip\"]").tooltip()))
    .build

  import settings._

  def example(question: String, answer: String, isGood: Boolean, tooltip: String = "") =
    <.li(
      <.span(
        if(isGood) Styles.goodGreen else Styles.badRed,
        TagMod(
          Styles.underlined,
          dataToggle := "tooltip",
{'fraction_non_alphanumeric': 0.11788211788211789, 'fraction_numerical': 0.0, 'mean_word_length': 4.020050125313284, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 5, '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': '4667396', 'n_tokens_mistral': 683, 'n_tokens_neox': 669, 'n_words': 131}