from .clean import get_terms, basename
from .classify import typesources, countrysources


class cleanco:
   "silly backwards compatibility wrapper, you should NOT use this"

   def __init__(self):
      self._types = typesources()
      self._countries = countrysources()
      self._terms = get_terms()

   def clean_name(self, name):
      return basename(name, self._terms)

   def country(self, name):
      return matches(name, self._countries)

   def type(self, name):
      return matches(name, self._types)

@@ -81,16 +81,25 @@
 ysources
+, matches
 %0A%0A%0Aclass
@@ -197,18 +197,48 @@
 t__(self
-):
+, name):%0A      self._name = name
 %0A      s
@@ -356,30 +356,24 @@
 an_name(self
-, name
 ):%0A      ret
@@ -385,16 +385,22 @@
 asename(
+self._
 name, se
@@ -426,30 +426,24 @@
 country(self
-, name
 ):%0A      ret
@@ -446,32 +446,38 @@
  return matches(
+self._
 name, self._coun
@@ -496,30 +496,24 @@
 ef type(self
-, name
 ):%0A      ret
@@ -524,16 +524,22 @@
 matches(
+self._
 name, se

fix backwards compatibility class