Permalink
Browse files

Removing commented code and some formatting of output

  • Loading branch information...
1 parent 79fc904 commit 5077cbd392a7963b801f7c33a7f181344db509d6 Zack Maril committed Jul 1, 2014
Showing with 6 additions and 19 deletions.
  1. +6 −19 bokonon/graph.py
View
@@ -5,8 +5,11 @@
from text import extractNames
def represent(v):
- l1 = ", ".join([v["name"],v["address"],v["city"],v["state"]])
- return l1
+ l = ", ".join([v["name"],v["address"],v["city"],v["state"]])
+ if "specific_issuse" in v:
+ l += "\n"+v["specific_issues"]
+ return l
+
def main():
print("Loading universe...")
universe = loadData()
@@ -20,23 +23,7 @@ def main():
matchTypeAndHasFields("client",["name"]),
lambda v: extractNames(v["name"]),
description="Merged clients based on extracted and cleaned name match")
-
- # p = matchTypeAndHasFields("client",["address","city","country","state","zip"])
- # groupMerge(universe,
- # lambda v: p(v) and v["state"] not in ["DC","VA","MD"] and v["city"] != "DC",
- # lambda v: [(v["address"],v["city"],v["country"],v["state"],v["zip"])],
- # description="Merging clients based on exact matching of address fields (sans DC area)")
-
- # groupMerge(universe,
- # matchTypeAndHasFields("firm",["orgname"]),
- # mnf("orgname"),
- # description="Merging firms based on *corrected* orgname")
-
- # groupMerge(universe,
- # matchTypeAndHasFields("firm",["printedname"]),
- # mnf("printedname"),
- # description="Merging firms based on *corrected* printedname")
-
+
project(universe,"clientnames.txt", lambda v: v["type"] == "client", represent)

0 comments on commit 5077cbd

Please sign in to comment.