You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Quentin Barrand eff2117b5e Configured Doxygen to use README.md as the source for the main page. 6 years ago
.travis.yml Added .travis.yml for automated builds. 6 years ago
Dconfig.c Moved several .h files to Ddictionary.h. 6 years ago
Dconfig.h Moved several .h files to Ddictionary.h. 6 years ago
Ddictionary.c Reimplemented the Dword_addSynonym() function so the synonym is also added to all the word's existing synonyms. 6 years ago
Ddictionary.h Reimplemented the Dword_addSynonym() function so the synonym is also added to all the word's existing synonyms. 6 years ago
Dnode.c Reorganized the project's structure; improved regex handling. 6 years ago
Dnode.h Reorganized the project's structure; improved regex handling. 6 years ago
Doxyfile Configured Doxygen to use README.md as the source for the main page. 6 years ago
Dword.c Reimplemented the Dword_addSynonym() function so the synonym is also added to all the word's existing synonyms. 6 years ago
DwordList.c Reimplemented the Dword_addSynonym() function so the synonym is also added to all the word's existing synonyms. 6 years ago
LICENSE Added README.md and a copy of the GNU GPL 2 license. 6 years ago
Makefile Moved several .h files to Ddictionary.h. 6 years ago
README.md Added README.md and a copy of the GNU GPL 2 license. 6 years ago
application.c Reimplemented the Dword_addSynonym() function so the synonym is also added to all the word's existing synonyms. 6 years ago
application.h Moved several .h files to Ddictionary.h. 6 years ago
commands.example Improved the application's structure. 6 years ago
definitions.example Improved the application's structure. 6 years ago
main.c Updated documentation. 6 years ago

README.md

A C-implemented dictionary

This is a project pmylene and I made during our 2nd semester at ENSIIE.

The subject was to implement a dictionary based on a 26-ary tree, with each word having references to its bases, synonyms and derivatives. The data structure should be imported from a definitions file, and the user should be offered a prompt allowing him to make various requests to the data structure.

Finally, the program should not have any memory leak.

Compilation Automated build by Travis CI

Very simply, using make : $ make.
If you want to get all the debug features and symbols, just call the dev target instead : $ make dev.

Usage

$ ./dictionary [options] <definitions file>

Options
-h Prints help and exits.
-d For each request, prints the number of dictionary cases we’ve been through.
-p Prints the data structure.
-if <commands file> Path to a commands file. See next section.

Definitions file
A list of commands that should be executed before the program starts and interactive prompt. See next section.

Configuration files

Definitions file (obligatory)

This argument is obligatory. It contains a list of words that should be inserted into the dictionary, with their bases and synonyms. See the included example.

Commands file (optional)

This argument is optional. It contains a list of commands, separated by a newline character (\0). These commands are executed before the interactive mode is started. See the included example.

Interactive mode

After all the options (and the commands included in the commands file, if applicable) have been processed, the user is offered a command prompt.
You can use the following commands :
BASE <word> Prints all the base words for the specified word.
DERI <word> Prints all the derivative words for the specified word.
SYNO <word> Prints all the synonyms of the specified word.
INFO <regex> Prints all the words matching the specified regular expression.

You can then quit the application using the q command.

Developper’s documentation

The documentation for this project is made using Doxygen. It is available here.

Copying / License

This free software is provided under the terms of the GNU General Public License 2. A copy of the license is integrated in the repo.