├── .project ├── simsearch ├── experiments │ ├── __init__.py │ ├── evaluate_paths.py │ ├── check_connectivity.py │ ├── simulate_accessibility.py │ └── simulate_search.py ├── static │ ├── img │ │ ├── magnifier.png │ │ ├── ajax-loader.gif │ │ ├── lookup_back_hover.png │ │ ├── lookup_back_static.png │ │ ├── lookup_reset_hover.png │ │ ├── lookup_forward_hover.png │ │ ├── lookup_reset_static.png │ │ └── lookup_forward_static.png │ ├── css │ │ ├── blueprint │ │ │ ├── src │ │ │ │ ├── grid.png │ │ │ │ ├── reset.css │ │ │ │ ├── print.css │ │ │ │ ├── forms.css │ │ │ │ ├── ie.css │ │ │ │ ├── typography.css │ │ │ │ └── grid.css │ │ │ ├── plugins │ │ │ │ ├── buttons │ │ │ │ │ ├── icons │ │ │ │ │ │ ├── key.png │ │ │ │ │ │ ├── cross.png │ │ │ │ │ │ └── tick.png │ │ │ │ │ ├── readme.txt │ │ │ │ │ └── screen.css │ │ │ │ ├── link-icons │ │ │ │ │ ├── icons │ │ │ │ │ │ ├── doc.png │ │ │ │ │ │ ├── im.png │ │ │ │ │ │ ├── pdf.png │ │ │ │ │ │ ├── xls.png │ │ │ │ │ │ ├── email.png │ │ │ │ │ │ ├── feed.png │ │ │ │ │ │ ├── external.png │ │ │ │ │ │ └── visited.png │ │ │ │ │ ├── readme.txt │ │ │ │ │ └── screen.css │ │ │ │ ├── rtl │ │ │ │ │ ├── readme.txt │ │ │ │ │ └── screen.css │ │ │ │ └── fancy-type │ │ │ │ │ ├── readme.txt │ │ │ │ │ └── screen.css │ │ │ ├── print.css │ │ │ ├── ie.css │ │ │ └── screen.css │ │ ├── static.css │ │ ├── lookup.css │ │ └── common.css │ └── js │ │ ├── jquery.sizes.min.js │ │ ├── search.js │ │ └── raphael-min.js ├── data │ └── jp_char_corpus_counts.gz ├── templates │ ├── 404.html │ ├── 500.html │ ├── static │ │ ├── base.html │ │ ├── feedback.html │ │ ├── about.html │ │ └── help.html │ ├── search │ │ ├── index.html │ │ └── display.html │ ├── base.html │ └── translate │ │ └── kanji.html ├── SConscript ├── views.py ├── urls.py ├── context.py ├── settings.py ├── heap_cache.py ├── stroke.pyx ├── __init__.py └── models.py ├── MANIFEST.in ├── simsearch.py ├── .gitignore ├── requirements.txt ├── .hgignore ├── Makefile ├── setup.py ├── README.rst └── SConstruct /.project: -------------------------------------------------------------------------------- 1 | name = simsearch 2 | -------------------------------------------------------------------------------- /simsearch/experiments/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | graft simsearch/data 2 | -------------------------------------------------------------------------------- /simsearch/static/img/magnifier.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsyencken/simsearch/HEAD/simsearch/static/img/magnifier.png -------------------------------------------------------------------------------- /simsearch/static/img/ajax-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsyencken/simsearch/HEAD/simsearch/static/img/ajax-loader.gif -------------------------------------------------------------------------------- /simsearch/data/jp_char_corpus_counts.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsyencken/simsearch/HEAD/simsearch/data/jp_char_corpus_counts.gz -------------------------------------------------------------------------------- /simsearch.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | if __name__ == '__main__': 4 | from simsearch import app 5 | app.run(debug=True) 6 | 7 | -------------------------------------------------------------------------------- /simsearch/static/css/blueprint/src/grid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsyencken/simsearch/HEAD/simsearch/static/css/blueprint/src/grid.png -------------------------------------------------------------------------------- /simsearch/static/img/lookup_back_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsyencken/simsearch/HEAD/simsearch/static/img/lookup_back_hover.png -------------------------------------------------------------------------------- /simsearch/static/img/lookup_back_static.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsyencken/simsearch/HEAD/simsearch/static/img/lookup_back_static.png -------------------------------------------------------------------------------- /simsearch/static/img/lookup_reset_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsyencken/simsearch/HEAD/simsearch/static/img/lookup_reset_hover.png -------------------------------------------------------------------------------- /simsearch/static/img/lookup_forward_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsyencken/simsearch/HEAD/simsearch/static/img/lookup_forward_hover.png -------------------------------------------------------------------------------- /simsearch/static/img/lookup_reset_static.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsyencken/simsearch/HEAD/simsearch/static/img/lookup_reset_static.png -------------------------------------------------------------------------------- /simsearch/static/img/lookup_forward_static.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsyencken/simsearch/HEAD/simsearch/static/img/lookup_forward_static.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | build/ 3 | simsearch.egg-info/ 4 | simsearch/stroke.c 5 | simsearch/stroke.so 6 | *.pyo 7 | *.pyc 8 | .simsearch-installed 9 | .models-created 10 | -------------------------------------------------------------------------------- /simsearch/static/css/blueprint/plugins/buttons/icons/key.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsyencken/simsearch/HEAD/simsearch/static/css/blueprint/plugins/buttons/icons/key.png -------------------------------------------------------------------------------- /simsearch/static/css/blueprint/plugins/buttons/icons/cross.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsyencken/simsearch/HEAD/simsearch/static/css/blueprint/plugins/buttons/icons/cross.png -------------------------------------------------------------------------------- /simsearch/static/css/blueprint/plugins/buttons/icons/tick.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsyencken/simsearch/HEAD/simsearch/static/css/blueprint/plugins/buttons/icons/tick.png -------------------------------------------------------------------------------- /simsearch/static/css/blueprint/plugins/link-icons/icons/doc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsyencken/simsearch/HEAD/simsearch/static/css/blueprint/plugins/link-icons/icons/doc.png -------------------------------------------------------------------------------- /simsearch/static/css/blueprint/plugins/link-icons/icons/im.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsyencken/simsearch/HEAD/simsearch/static/css/blueprint/plugins/link-icons/icons/im.png -------------------------------------------------------------------------------- /simsearch/static/css/blueprint/plugins/link-icons/icons/pdf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsyencken/simsearch/HEAD/simsearch/static/css/blueprint/plugins/link-icons/icons/pdf.png -------------------------------------------------------------------------------- /simsearch/static/css/blueprint/plugins/link-icons/icons/xls.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsyencken/simsearch/HEAD/simsearch/static/css/blueprint/plugins/link-icons/icons/xls.png -------------------------------------------------------------------------------- /simsearch/static/css/blueprint/plugins/link-icons/icons/email.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsyencken/simsearch/HEAD/simsearch/static/css/blueprint/plugins/link-icons/icons/email.png -------------------------------------------------------------------------------- /simsearch/static/css/blueprint/plugins/link-icons/icons/feed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsyencken/simsearch/HEAD/simsearch/static/css/blueprint/plugins/link-icons/icons/feed.png -------------------------------------------------------------------------------- /simsearch/static/css/blueprint/plugins/link-icons/icons/external.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsyencken/simsearch/HEAD/simsearch/static/css/blueprint/plugins/link-icons/icons/external.png -------------------------------------------------------------------------------- /simsearch/static/css/blueprint/plugins/link-icons/icons/visited.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/larsyencken/simsearch/HEAD/simsearch/static/css/blueprint/plugins/link-icons/icons/visited.png -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | cjktools>=1.5.0 2 | cjktools-data>=0.2.1-2010-07-29 3 | consoleLog>=0.2.4 4 | simplestats>=0.2.0 5 | pymongo 6 | mongoengine>=0.3 7 | pyyaml 8 | nltk 9 | mercurial 10 | flask 11 | simplejson 12 | cython 13 | -------------------------------------------------------------------------------- /.hgignore: -------------------------------------------------------------------------------- 1 | syntax: glob 2 | *.pyc 3 | *.pyo 4 | *.swp 5 | *.orig 6 | *-env 7 | local_settings.py 8 | simsearch/stroke.{so,os,c} 9 | *.log 10 | distribute*.tar.gz 11 | .scon* 12 | .DS_Store 13 | *.paths 14 | *.csv 15 | tags 16 | build 17 | dist 18 | *.egg-info 19 | -------------------------------------------------------------------------------- /simsearch/templates/404.html: -------------------------------------------------------------------------------- 1 | {% extends "static/base.html" %} 2 | 3 | {% block inner_content %} 4 |
Hi there! I'm not sure which page you were looking for, but we don't seem 6 | to have it. If you're lost, search page 7 | is always a good place to start.
8 | {% endblock %} 9 | -------------------------------------------------------------------------------- /simsearch/static/css/blueprint/plugins/rtl/readme.txt: -------------------------------------------------------------------------------- 1 | RTL 2 | * Mirrors Blueprint, so it can be used with Right-to-Left languages. 3 | 4 | By Ran Yaniv Hartstein, ranh.co.il 5 | 6 | Usage 7 | ---------------------------------------------------------------- 8 | 9 | 1) Add this line to your HTML: 10 | 11 | -------------------------------------------------------------------------------- /simsearch/static/css/blueprint/plugins/fancy-type/readme.txt: -------------------------------------------------------------------------------- 1 | Fancy Type 2 | 3 | * Gives you classes to use if you'd like some 4 | extra fancy typography. 5 | 6 | Credits and instructions are specified above each class 7 | in the fancy-type.css file in this directory. 8 | 9 | 10 | Usage 11 | ---------------------------------------------------------------- 12 | 13 | 1) Add this plugin to lib/settings.yml. 14 | See compress.rb for instructions. 15 | -------------------------------------------------------------------------------- /simsearch/templates/500.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |Terribly sorry, the site had an internal error of some sort. If this keeps happening, please file a bug on our bitbucket page.
9 | 10 | 11 | -------------------------------------------------------------------------------- /simsearch/templates/static/base.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block headers %} 4 | 6 | {% block sub_headers %}{% endblock %} 7 | {% endblock %} 8 | 9 | {% block content %} 10 |Interfaces like this can only get better with your help. If you have 7 | difficulty using the interface, feature suggestions, or any other kind of 8 | feedback, please send an email to lars@yencken.org. 9 | 10 |
Also note that the full source code to this site is available on Bitbucket, allowing you to host your own version, or modify it as you like.
11 | 12 | {% endblock %} 13 | -------------------------------------------------------------------------------- /simsearch/SConscript: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # SConscript 4 | # simsearch 5 | # 6 | # Created by Lars Yencken on 27-08-2010. 7 | # Copyright 2010 Lars Yencken. All rights reserved. 8 | # 9 | 10 | """ 11 | Scons build file for structure extensions. 12 | """ 13 | 14 | #----------------------------------------------------------------------------# 15 | 16 | Import('env') 17 | 18 | #----------------------------------------------------------------------------# 19 | 20 | stroke = env.Cython('stroke.c', 'stroke.pyx') 21 | env.SharedLibrary('stroke', stroke) 22 | 23 | #----------------------------------------------------------------------------# 24 | -------------------------------------------------------------------------------- /simsearch/views.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # views.py 4 | # simsearch 5 | # 6 | # Created by Lars Yencken on 24-08-2010. 7 | # Copyright 2010 Lars Yencken. All rights reserved. 8 | # 9 | 10 | """ 11 | """ 12 | 13 | from django.views.static import serve 14 | from django.conf import settings 15 | 16 | def media(request): 17 | """ 18 | Use this to serve static media. Since some of the media may be files 19 | which were uploaded, we want to password protect everything. 20 | """ 21 | return serve(request, request.path[len(settings.MEDIA_URL):], 22 | document_root=settings.MEDIA_ROOT) 23 | 24 | # vim: ts=4 sw=4 sts=4 et tw=78: 25 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | 2 | serve: .simsearch-installed .models-created 3 | env/bin/python setup.py develop 4 | env/bin/python simsearch.py 5 | 6 | env: requirements.txt 7 | test -d env || virtualenv -p python2.7 env 8 | env/bin/pip install -r requirements.txt 9 | touch env 10 | 11 | env/bin/cython: env 12 | 13 | .simsearch-installed: simsearch/stroke.c 14 | env/bin/python setup.py develop 15 | touch $@ 16 | 17 | .models-created: .simsearch-installed 18 | env/bin/python -m simsearch.models 19 | touch $@ 20 | 21 | simsearch/stroke.c: simsearch/stroke.pyx env/bin/cython 22 | env/bin/cython $< 23 | 24 | clean: 25 | rm -rf env build .simsearch-installed .models-created simsearch.egg-info 26 | -------------------------------------------------------------------------------- /simsearch/urls.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # urls.py 4 | # simsearch 5 | # 6 | # Created by Lars Yencken on 24-08-2010. 7 | # Copyright 2010 Lars Yencken. All rights reserved. 8 | # 9 | 10 | from django.conf.urls.defaults import * 11 | from django.conf import settings 12 | 13 | _patterns = ['', 14 | (r'^translate/', include('simsearch.translate.urls')), 15 | (r'', include('simsearch.static.urls')), 16 | (r'', include('simsearch.search.urls')), 17 | ] 18 | 19 | if settings.DEBUG: 20 | _patterns[1:1] = [ 21 | url(r'^media/', 'simsearch.views.media', name='media'), 22 | ] 23 | 24 | urlpatterns = patterns(*_patterns) 25 | 26 | # vim: ts=4 sw=4 sts=4 et tw=78: 27 | -------------------------------------------------------------------------------- /simsearch/static/css/lookup.css: -------------------------------------------------------------------------------- 1 | /* 2 | * lookup.css 3 | */ 4 | 5 | body { 6 | background: #f3f3f3; 7 | } 8 | 9 | a {text-decoration: none; } 10 | a img {border: none;} 11 | 12 | p { 13 | text-align: center; 14 | font: 300 1.2em "Helvetica Neue", Helvetica, "Arial Unicode MS", Arial, sans-serif; 15 | } 16 | 17 | #seedLookup { 18 | width:190px; 19 | height:50px; 20 | position:absolute; margin:auto; top:0; right:0; left:0; bottom:0; 21 | text-align: center; 22 | } 23 | 24 | #seedInput { 25 | border:1px solid #505050; 26 | font-size:20px; 27 | width: 120px; 28 | margin: 0px; 29 | vertical-align: top; 30 | } 31 | 32 | #seedLookup > img { 33 | width: 29px; 34 | height: 29px; 35 | margin: 0px; 36 | } 37 | -------------------------------------------------------------------------------- /simsearch/templates/search/index.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block headers %} 4 | 5 | {% endblock %} 6 | 7 | {% block body_tags %}onload="document.getElementById('seedInput').focus()"{% endblock %} 8 | 9 | {% block content %} 10 |17 | {% if error %} 18 | {{error}} (help) 19 | {% else %} 20 | Enter the kanji you want to find, or one that looks similar. 21 | {% endif %} 22 |
23 |