[geodisambig] Python scripts to prep GeoNames records for trie insertion

This commit is contained in:
Al
2015-03-13 11:56:48 -04:00
parent 53aa9bccb1
commit 284af74ba4
7 changed files with 619 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
import os
import subprocess
def unzip_file(filename, dest_dir):
subprocess.call(['unzip', '-o', filename, '-d', dest_dir])
def remove_file(filename):
os.unlink(filename)
def ensure_dir(d):
if not os.path.exists(d):
os.makedirs(d)