Hanja
Getting hanja characters for korean words
 
Loading...
Searching...
No Matches
api.app Namespace Reference

Functions

 index ()
 Render the main page with a search form and sets the default language to English.
 
 set_language ()
 Set the user's preferred language and store it in the session and cookie.
 
 search ()
 Handle search requests and display results based on the searched word.
 
 related_words ()
 Retrieve related words for a given Hanja character.
 
 autocomplete ()
 Return word suggestions for the search bar autocomplete.
 
 vercel_app (environ, start_response)
 Entry point for Vercel serverless function.
 

Variables

 app
 
 secret_key
 
str folder_path = "data/전체 내려받기_한국어기초사전_json_20250112"
 
 data_access = DataAccess()
 
 data_processor = DataProcessor(folder_path)
 
 host
 
 port
 
 debug
 

Function Documentation

◆ autocomplete()

api.app.autocomplete ( )

Return word suggestions for the search bar autocomplete.

Returns
JSON response containing a list of word suggestions.

◆ index()

api.app.index ( )

Render the main page with a search form and sets the default language to English.

Returns
Rendered HTML template for the main page.

◆ related_words()

api.app.related_words ( )

Retrieve related words for a given Hanja character.

Returns
JSON response containing unique related words.

◆ search()

api.app.search ( )

Handle search requests and display results based on the searched word.

Returns
Rendered HTML template with search results.

◆ set_language()

api.app.set_language ( )

Set the user's preferred language and store it in the session and cookie.

Returns
Redirect response to the index page.

◆ vercel_app()

api.app.vercel_app (   environ,
  start_response 
)

Entry point for Vercel serverless function.

Parameters
environThe WSGI environment.
start_responseThe WSGI start response callable.
Returns
WSGI response.

Variable Documentation

◆ app

api.app.app
Initial value:
1= Flask(
2 __name__,
3 template_folder=os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'templates'),
4 static_folder=os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'static')
5)

◆ data_access

api.app.data_access = DataAccess()

◆ data_processor

api.app.data_processor = DataProcessor(folder_path)

◆ debug

api.app.debug

◆ folder_path

str api.app.folder_path = "data/전체 내려받기_한국어기초사전_json_20250112"

◆ host

api.app.host

◆ port

api.app.port

◆ secret_key

api.app.secret_key