|
1 | 1 | # Learn Chinese |
2 | 2 | Simple game to learn how to form Chinese words |
3 | 3 |
|
4 | | -The project utilises a java web crawler to get our database of questions. |
5 | | -The words are obtained by crawling [Weibo](www.weibo.com) daily. |
6 | | -New words are then added to our database. |
7 | | -The words are then extracted and obfuscated to produce questions. |
| 4 | +The project utilises a python web crawler to get our database of questions. |
| 5 | +The sentences are obtained by crawling [mojim](www.mojim.com) daily. |
| 6 | +New sentences are then added to our database. |
| 7 | +The sentences are then extracted and obfuscated to produce questions. |
8 | 8 | Users then simply pick correct words that fit into sentences or phrases presented to them. |
| 9 | +The sentences care basically song lyrics that we have crawled from mojim.com |
9 | 10 |
|
10 | 11 | # Structure |
11 | 12 | The project is split into its front end, back end as well as the crawler. |
12 | | -The crawler is a standalone java app. The app will be run daily by the server to renew the database. |
13 | | -The front end contains all the code pertaining to how the interface for the game will look to the users. |
| 13 | +The crawler is a standalone python script. The script will be run daily by the server to renew the database. |
| 14 | +The front end contains all the code pertaining to how the interface for the game will look to the users. It will be a php file, and utilizes jQuery to communicate with the server to pull questions. |
14 | 15 | The back end handles all the server side logic for the game. This involve pulling phrases or words from the database and turning them into questions. |
15 | 16 |
|
16 | 17 | # Dependencies |
17 | | -We have some libraries that we are dependent upon. |
18 | | -The required jars have been included in the repository. |
19 | | -The following is the list of dependencies. |
20 | 18 |
|
21 | | -#### Apache HTTPComponents |
22 | | -Used for connecting to the websites |
23 | | -If there are issues with the jars provided in the repo, you may get the latest version [here](https://hc.apache.org/downloads.cgi). |
| 19 | +There are some dependencies involved in this project. |
| 20 | +For the front end, we have bootstrap as well as jquery. Both have been included into the repository. As for the dependencies that are not included, we have included instructions on how to obtain them. |
24 | 21 |
|
25 | | -#### JSoup |
26 | | -Used to manipulate the HTTP pages that we have crawled |
27 | | -If there are issues with the jars provided in the repo, you may get the latest version [here](https://jsoup.org/download). |
| 22 | +#### Python |
| 23 | +As the backend and crawling are performed by python scripts, the webserver must support python. The version used for development was 2.7.12 |
| 24 | +#### [BeautifulSoup](https://www.crummy.com/software/BeautifulSoup/bs4/doc/) |
| 25 | +The crawler utilises Beautiful Soup 4 to perform the http parsing. To download or install Beautiful Soup 4, please proceed to [their documentation](https://www.crummy.com/software/BeautifulSoup/bs4/doc/) site for instructions. |
28 | 26 |
|
29 | | -#### dom4J |
30 | | -Used to parse the HTTP pages that we have crawled |
31 | | -If there are issues with the jars provided in the repo, you may get the latest version [here](https://github.com/dom4j/dom4j/releases). |
| 27 | +# Runing the game |
| 28 | +On the backend, we have uploaded a script learn.sh. Run this script to perform the crawling and question generation. |
| 29 | +Then, to play the game, you would need a server that can handle php as well as jQuery requests. |
0 commit comments