Skip to content

Commit

Permalink
fix(cluster): allow disable local saturation check
Browse files Browse the repository at this point in the history
  • Loading branch information
Sieboldianus committed Jan 24, 2019
1 parent e651ff8 commit 65d3a60
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions tagmaps/__main__.py
Expand Up @@ -119,6 +119,7 @@ def main():
cluster_types.append(EMOJI)
if cfg.cluster_locations:
cluster_types.append(LOCATIONS)

# initialize clusterers
clusterer_list = list()
for cls_type in cluster_types:
Expand Down
1 change: 1 addition & 0 deletions tagmaps/classes/cluster.py
Expand Up @@ -645,6 +645,7 @@ def get_cluster_shapes(self):
saturation_exclude_count = 0
shapes_and_meta = list()
tnum = 0
topitem_area = None
if self.local_saturation_check:
# calculate total area of Top1-Tag
# for 80% saturation check for lower level tags
Expand Down
12 changes: 6 additions & 6 deletions tagmaps/config/config.py
Expand Up @@ -101,14 +101,14 @@ def parse_args(self):
"(no filtering based on tags or emoji)"
)
parser.add_argument("-c",
"--localSaturationCheck",
"--disableLocalSaturationCheck",
action="store_true",
default=False,
help="Will exclude any tags that "
default=True,
help="Will not exclude any tags that "
"are (over)used at above a certain percentage "
"of locations in processing extent. Since this "
"will usually improve legibility of tag maps, it "
"is enabled by default."
"is enabled by default. Disable with this flag."
)
parser.add_argument("-j",
"--tokenizeJapanese",
Expand Down Expand Up @@ -217,8 +217,8 @@ def parse_args(self):
self.topic_modeling = args.topicModeling
if args.writeCleanedData:
self.write_cleaned_data = args.writeCleanedData
if args.localSaturationCheck:
self.local_saturation_check = args.localSaturationCheck
if args.disableLocalSaturationCheck:
self.local_saturation_check = False
if args.shapefileIntersect:
self.shapefile_intersect = args.shapefileIntersect
if args.shapefilePath:
Expand Down

0 comments on commit 65d3a60

Please sign in to comment.