Skip to content

Commit

Permalink
Version 1.0
Browse files Browse the repository at this point in the history
Huge edits, removed nearly 1,000 lines and it works the same with more
efficient code.
  • Loading branch information
psolin committed Mar 20, 2014
1 parent 6c0806b commit 24ddbe5
Show file tree
Hide file tree
Showing 6 changed files with 432 additions and 1,473 deletions.
926 changes: 206 additions & 720 deletions build/lib/cleanco.py

Large diffs are not rendered by default.

926 changes: 206 additions & 720 deletions cleanco.py

Large diffs are not rendered by default.

Binary file modified cleanco.pyc
Binary file not shown.
21 changes: 8 additions & 13 deletions cleancotest.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
from cleanco import cleanco

companyname = "GlaxoSmithKline plc."
cleanco = cleanco(companyname)
business_name = "Merck Pharmaceutials - Corporate (formerly Not Merck) LLC"

bustype = cleanco.type()
busind = cleanco.industry()
cleanname = cleanco.cleanname()
short = cleanco.shortname()
country = cleanco.country()
processing = cleanco(business_name)
x = processing.cleaner()

print
print("String: %s") % companyname
print business_name
print
print("Clean Name: %s") % cleanname
print("Short Name: %s") % short
print("Possible Business Types: %s") % bustype
print("Possible Industry: %s") % busind
print("Possible Country: %s") % country
print("Clean Name: %s") % (x.clean_name)
print("Possible Industries: %s") % (x.industry)
print("Possible Business Types: %s") % (x.type)
print("Possible Countries: %s") % (x.country)
print
30 changes: 11 additions & 19 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#cleanco
#cleanco - 1.0

## What is it / what does it do?
This is a Python module that processes company names.
Expand All @@ -8,9 +8,6 @@ Download it from this site and unzip the directory.

* Mac: `cd` into it, and enter `sudo python setup.py install` along with your system password.
* Windows: Same thing but without `sudo`.
* Linux: ???

There may also be a way to do `pip install` but I can't guarantee this.

## How does the module work?
Let's look at some sample code. First, initialize the module:
Expand All @@ -19,37 +16,32 @@ Let's look at some sample code. First, initialize the module:

Now, come up with a company name that you want to process:

>>> companyname = "Paul Pharmaceutical, Inc."
>>> business_name = "Some Big Pharma, LLC"

Throw it into the module:

>>> processing = cleanco(companyname)
>>> processing = cleanco(business_name)
>>> x = processing.cleaner()

You can now get the company types:

>>> cotype = processing.type()
>>> print cotype
['Corporation']
>>> x.type
['Limited Liability Company']

...the possible countries...

>>> country = processing.country()
>>> print country
['Philippines', 'United States']
>>> x.country
['United States of America', 'Philippines']

...the possible industries...

>>> industry = processing.industry()
>>> print industry
>>> x.industry
['Pharmaceutical']

...and a clean version of the company name.

>>> clean = processing.cleanname()
>>> print clean
Paul Pharmaceutical

There is also a short version of the company name for times when you want to remove things in parenthesis or everything after a hyphen. You can access this with `.shortname()`.
>>> x.clean_name
'Some Big Pharma'

## Are there bugs?
You better believe it. Please let me know or fork this project. I'm sure some of the company suffixes are way incorrect and I'm missing a lot more information.
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

from distutils.core import setup
setup(name='cleanco',
version='0.4',
version='1.0',
py_modules=['cleanco'],
)

0 comments on commit 24ddbe5

Please sign in to comment.