<commit_before>object WikiClasses {

	case class Link(alias: String, var page: String, offset: Int)
	case class WikipediaEntry(title: String, var text: Option[String]) {
		def setText(t: String): Unit = {
			text = Option(t)
		}
		def getText(): String = text match {
			case Some(t) => t
			case None => ""
		}
	}
	case class ParsedWikipediaEntry(title: String, var text: Option[String], var links: List[Link], var foundaliases: List[String] = List[String]()) {
		def setText(t: String): Unit = {
			text = Option(t)
		}
		def getText(): String = text match {
			case Some(t) => t
			case None => ""
		}
	}

	case class AliasCounter(alias: String, var linkoccurrences: Int = 0, var totaloccurrences: Int = 0)
	case class AliasOccurrencesInArticle(links: Set[String], noLinks: Set[String])
	
	// Seq is Serializable, Map isn't
	case class Alias(alias: String, pages: Seq[(String, Int)])
	case class Page(page: String, aliases: Seq[(String, Int)])

}<commit_msg>implemented basic context extractor #18<commit_after>object WikiClasses {

	case class Link(alias: String, var page: String, offset: Int)
	case class WikipediaEntry(title: String, var text: Option[String]) {
		def setText(t: String): Unit = {
			text = Option(t)
		}
		def getText(): String = text match {
			case Some(t) => t
			case None => ""
		}
	}
	case class ParsedWikipediaEntry(title: String, var text: Option[String], var links: List[Link], var foundaliases: List[String] = List[String]()) {
		def setText(t: String): Unit = {
			text = Option(t)
		}
		def getText(): String = text match {
			case Some(t) => t
			case None => ""
		}
	}

	case class AliasCounter(alias: String, var linkoccurrences: Int = 0, var totaloccurrences: Int = 0)
	case class AliasOccurrencesInArticle(links: Set[String], noLinks: Set[String])

	case class LinkContext(pagename: String, words: Set[String]) // TODO: make it to a Bag of words
	
	// Seq is Serializable, Map isn't
	case class Alias(alias: String, pages: Seq[(String, Int)])
	case class Page(page: String, aliases: Seq[(String, Int)])

}
{'fraction_non_alphanumeric': 0.135386119257087, 'fraction_numerical': 0.002932551319648094, 'mean_word_length': 4.303108808290156, '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': '4218434', 'n_tokens_mistral': 744, 'n_tokens_neox': 670, 'n_words': 220}