From: Brian Quinion Date: Tue, 19 Mar 2013 19:44:33 +0000 (+0000) Subject: calculate the importance value X-Git-Tag: v2.2.0~101 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/a8608e2b796fd4f7885baddea391add5e308389a?hp=5ae905b20a7dfa36289a8d1d596126eaa6c8ba3d calculate the importance value --- diff --git a/utils/import_wikipedia.sh b/utils/import_wikipedia.sh index d40578dd..0a15e2d0 100755 --- a/utils/import_wikipedia.sh +++ b/utils/import_wikipedia.sh @@ -39,6 +39,8 @@ do echo "insert into wikipedia_article select '${i}', title, count, othercount, count+othercount from ${i}pagelinkcount;" | $psqlcmd done +echo "update wikipedia_article set importance = log(totalcount)/log((select max(totalcount) from wikipedia_article))" | $psqlcmd + # precalculated lat,lon from dbpedia wget http://downloads.dbpedia.org/current/en/geo_coordinates_en.nq.bz2 bzip2 -dc geo_coordinates_en.nq.bz2 | grep http://www.georss.org/georss/point | sed 's|]*> * "\(-\?[-0-9.E]\+\) \(-\?[-0-9.E]\+\)"@en .|update pagelinks set lat=\1, lon=\2 where language = '"'"'\3'"'"' and title = decode_url_part('"'"'\4'"'"');|g' | $psqlcmd