         return eo.rangeOfString(pattern, options: [.RegularExpressionSearch, .CaseInsensitiveSearch])
     }
 
-    func nounParts() -> GrammarResult? {
-        if let range = match("oj?n?!?$") {
-            let base = eo[eo.startIndex..<range.startIndex]
-            var parts = [base]
-            for char in eo[range.startIndex..<eo.endIndex].characters {
-                parts.append(String(char))
-            }
-            return (base, parts)
-        }
-        return .None
-    }
-
-    func verbParts() -> GrammarResult? {
-        if let range = match("(i|as|u)!?$") {
-            let base = eo[eo.startIndex..<range.startIndex]
-            var parts = [base]
-            for char in eo[range.startIndex..<eo.endIndex].characters {
-                parts.append(String(char))
-            }
-            return (base, parts)
-        }
-        return .None
-    }
-
-    func adjectiveParts() -> GrammarResult? {
-        if let range = match("aj?n?$") {
+    func partsByPattern(pattern: String) -> GrammarResult? {
+        if let range = match(pattern) {
             let base = eo[eo.startIndex..<range.startIndex]
             if base.characters.count > 0 {
                 var parts = [base]

            }
        }
        return results
    }

    func particles() -> [String] {
        return ["ajn", "almenaŭ", "ankaŭ", "apenaŭ", "eĉ", "hoj", "ja", "jam", "jes", "kaj", "ke", "kvankam", "kvazaŭ", "malpli", "malplej", "mem", "nek", "nur", "ol", "plej", "pli", "plu", "se", "sed", "tamen", "tre", "tro", "tuj", "ĉar", "ĉi", "ĵus"]

    }

    func translatedWordClass() -> String? {

            wordClass = .Suffix
        } else if isPrefix() {
            wordClass = .Prefix
        } else if prepositions.contains(eo.lowercaseString) {
            wordClass = .Preposition
        } else if pronouns.contains(eo.lowercaseString) {
            wordClass = .Pronoun
        } else if numerals().contains(eo.lowercaseString) {
            wordClass = .Numeral
        } else if particles.contains(eo.lowercaseString) {
            wordClass = .Particle
        } else if adverbs.contains(eo.lowercaseString) {
            wordClass = .Adverb
        } else if let (base, parts) = partsByPattern("en?!?$") {
            wordClass = .Adverb
            self.base = base
            self.parts = parts
        } else if let (base, parts) = partsByPattern("(i|as|u)!?$") {
            wordClass = .Verb
            self.base = base
            self.parts = parts
        } else if let (base, parts) = partsByPattern("oj?n?!?$") {
            wordClass = .Noun
            self.base = base
            self.parts = parts
        } else if let (base, parts) = partsByPattern("aj?n?$") {
            wordClass = .Adjective
            self.base = base
            self.parts = parts
