-
-
Save MSch/73856f51180146dd31dc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Stemmer do | |
def stem(word) do | |
IO.puts "stemming #{word}" | |
case Regex.run(~r/^(.+?)(ASD|QWE)$/u, word) do | |
[pattern_matching, like, "ASD"] -> IO.inspect like | |
[pattern_matching, like, "QWE"] -> IO.puts "whatever" | |
end | |
end | |
end | |
Stemmer.stem("blabla ASD") | |
Stemmer.stem("blabla QWE") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment