Top "Pattern-matching" questions

Use this tag for questions about testing whether a data structure has a particular shape or contains particular values in certain locations.

What causes "irrefutable pattern failed for pattern" and what does it mean?

What does irrefutable pattern failed for pattern mean? What cases will cause this runtime error?

haskell pattern-matching runtime-error
Convert StringType Column To ArrayType In PySpark

I have a dataframe with column "EVENT_ID" whose datatype is String. I am running FPGrowth algorithm but throws the …

python python-3.x pyspark pattern-matching fpgrowth
How to pattern match large Scala case classes?

Consider the following Scala case class: case class WideLoad(a: String, b: Int, c: Float, d: ActorRef, e: Date) Pattern …

scala pattern-matching
Difference between Closed and open Sequential Pattern Mining Algorithms

I want to use some algorithms to mine my log data. I found a pattern mining framework on: http://www.…

pattern-matching data-mining sequential apriori
Multiple assignment of non-tuples in scala

Just to clarify, when I say multiple assigment, parallel assignment, destructuring bind I mean the following pattern matching gem scala&…

arrays scala functional-programming pattern-matching variable-assignment
Regex Valid Twitter Mention

I'm trying to find a regex that matches if a Tweet it's a true mention. To be a mention, the …

regex twitter pattern-matching preg-match
how to to do the "noop but return unit" in OCaml

I want to print a list of strings after going through a pattern matching just to get into this powerful …

pattern-matching ocaml noop
Python regex to match IP-address with /CIDR

m = re.findall("\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}",s) How do I modify it so it will match not only IPv4, …

python regex pattern-matching ip-address cidr
Training the "tesseract ocr" with predefined font images

I am trying to make OCR recognition of ASCII strings from the image. I am using Tesseract3 library, but I …

pattern-matching ascii ocr tesseract training-data