<commit_before>package latis.reader

import latis.reader.tsml._
import org.junit._
import Assert._
import latis.writer.AsciiWriter
import java.net.URL
import latis.ops._

class TestLisirdLEMRCatalogGenerator {
  
  @Test
  def check_lemr_catalog = {
    val ds = LisirdLemrCatalogGenerator().getDataset 

    AsciiWriter.write(ds)
    assertEquals(39, ds.getLength) //This number could change if LEMR changes
  }
  
  
}<commit_msg>Correct check_lemr_catalog unit test (comment write, assert sample).<commit_after>package latis.reader

import latis.reader.tsml._
import org.junit._
import Assert._
import latis.writer.AsciiWriter
import java.net.URL
import latis.ops._
import latis.dm._
import latis.metadata.Metadata

class TestLisirdLEMRCatalogGenerator {
  
  @Test
  def check_lemr_catalog = {
    val ds = LisirdLemrCatalogGenerator().getDataset 

    //AsciiWriter.write(ds)
    ds match {
      case Dataset(Function(it)) if it.hasNext => it.next match {
        case Sample(Text(name), TupleMatch(Text(description), TupleMatch(Text(accessURL)))) => {
          assertEquals("cak", name)
          assertEquals("", description)
          assertEquals("cak", accessURL)
        }
        case _ => fail
      }
      case _ => fail
    }
  }
  
  
}
{'fraction_non_alphanumeric': 0.09800796812749003, 'fraction_numerical': 0.0015936254980079682, 'mean_word_length': 3.316151202749141, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '4669632', 'n_tokens_mistral': 407, 'n_tokens_neox': 398, 'n_words': 88}