wguess 2.0.1
�� a simple library that provides easy functionality for building word quizzes with the English language.
Requires Python: >=3.4

![WordGuess](https://user-images.githubusercontent.com/40426447/80461508-0a2e3700-893e-11ea-8550-246dc270d71a.png)

�� a simple library that provides easy functionality for building word quizzes with the English language.

# Getting Started
Let's import the main classes before using them:
```
from wordguess import WordBase, WordTree, WDict
```
The base class of this library is called 'WBase' (WordBase). This class defines many of the attributes related to the word, such as: definition, synonyms, typeof, examples, etc, but also include some useful functions. Let's try getting the examples/usages of the word, in a sentence:
```
>>> wBase = WBase('Extreme').examples
None
```
We've got None because of the reason that this class is actually not responsible for getting the data about the word. Even if it would, it wouldn't know what meaning you refer to while each word can have several meanings. Instead, we would want to instantiate the WTree (WordTree) class, which would give us all of the different meanings of the word.
```
>>> wTree = WordTree('Extreme', headers=h)
>>> wBase = wTree.meanings[0]
>>> wBase.examples
['an extreme conservative', 'an extreme liberal', 'extreme views on integration', 'extreme opinions']
```
The '.meanings' property is an iterable contains WBase objects. The 'headers' parameter is needed to verify your identity while requesting the words data from the server. You can get it here: https://rapidapi.com/dpventures/api/WordsAPI.

Let's get even more advance and create a collection of words that would contain a bunch of WTree objects, and any WTree object would contain N meanings or N WBase objects.
```
>>> wlist = ['New','Far','Pay','Table']
>>> wDict = WDict(*wlist, headers=h)
>>> wDict.words
[<wordguess.WTree object at 0x0000019A4E0A38E0>
 <wordguess.WTree object at 0x0000019A4E0A38B0>
 <wordguess.WTree object at 0x0000019A4E0A3550>
 <wordguess.WTree object at 0x0000019A4E0A3F40>]
 ```
Ok, so we got a numpy array containing WTree objects, pretty cool structure haaaa (; From this and on you can go much beyond and implement your own functionality. I reccomand you to go and try the Advance Usage section where you would see real world examples. Other than that, it's more than reccomanded to understand this structure which represents part of the library structure:

![structure](https://user-images.githubusercontent.com/40426447/80466017-9d6a6b00-8944-11ea-87bb-3c2a0a4fb595.png)


# Advanced Usage

### Upload words from .txt file
To do so, we would want to use the WDict class, and this is due to the reason that we want to upload many different words:
```
from wordguess import WDict
```
Then, the easy way to to it is just by using the .from_txt(...) class function, which will initialize the words you want, from the given file. Let's upload the words from the .txt file and get the WTree objects was created:
```
>>> path = r'C:\Users\user1\Desktop\file.txt'
>>> wDict = WDict.from_txt(source=path)
>>> wDict.words
[<wordguess.WTree object at 0x0000018F8BF266A0>
 <wordguess.WTree object at 0x0000018F95F38F10>
 <wordguess.WTree object at 0x0000018F95F38F40> ...
 <wordguess.WTree object at 0x0000018F9620D790>
 <wordguess.WTree object at 0x0000018F9620D7C0>
 <wordguess.WTree object at 0x0000018F9620D7F0>]
```

### Generate multiple questions
...


### Framing and querying
...

# ToDo
1. ADD: functionality for accepting multiple answers for a question - Question.
2. IMPLEMENT: a class to enable interaction with the library to non-developers such as teachers and students.
 The class will be able to generate questions according to certain conditions, which will be a quiz.