Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
shtrausslearning authored Jun 20, 2023
1 parent e52ac43 commit e78f404
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![](https://i.imgur.com/Okdo3qc.jpg)
![](https://i.imgur.com/9ASYY1n.jpg)

![](https://camo.githubusercontent.com/d38e6cc39779250a2835bf8ed3a72d10dbe3b05fa6527baa3f6f1e8e8bd056bf/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f436f64652d507974686f6e2d696e666f726d6174696f6e616c3f7374796c653d666c6174266c6f676f3d707974686f6e266c6f676f436f6c6f723d776869746526636f6c6f723d326262633861) ![](https://badgen.net/badge/status/WIP/blue)

Expand All @@ -7,7 +7,6 @@
***

- **mllibs** is a Machine Learning (ML) library which utilises natural language processing (NLP)
- In this notebook, we look at implementing an **NLP interpreter** module for ML related operations
- Development of such helper modules are motivated by the fact that everyones understanding of coding & subject matter (ML in this case) may be different
- Often we see people create **functions** and **classes** to simplify the process of achieving something (which is good practice)
- Likewise, **NLP interpreters** follow this trend as well, except, in this case our only inputs for activating certain code is **natural language**
Expand Down Expand Up @@ -67,7 +66,7 @@ nlp_interpreter(input) # [0, 1, 1, 2, 3]

<br>

#### **3. LETS LOOK AT AN EXAMPLE**
#### **3. LETS LOOK AT AN EXAMPLE USING MLLIBS**

***

Expand Down Expand Up @@ -123,14 +122,7 @@ Here are some anwsers:

(2) custom added modules, for mllibs these library are associated with **machine learning**

- `loader` - file management module, who's role is to access data, so it can be used (testing module)
- `simple_eda` - exploratory data analysis module (testing module)
- `eda_plot` - exploratory data analysis module associated with static graph plots (utilises seaborn)
- `encoder` - nlp related module for converting text to numeric representation (text encoding)
- `embedding` - nlp related module for generating embeddings for tokenised text data
- `cleantext` - nlp related module for cleaning input text data
- `sklinear` - Linear Regression module (testing module)
- `hf_pipeline` - nlp related module for accessing huggingface pipelines
You can check all the activations functions using <code>session.fl()</code> as shown in the sample notebooks

<br>

Expand Down Expand Up @@ -187,6 +179,8 @@ configure_sample = {'corpus':corpus_sample,'info':info_sample}

#### **8. CREATING A COLLECTION**

There are two ways to start an interpreter session, manually importing and grouping modules or using <code>interface</code> class

***

First we need to combine all our module components together, this will link all passed modules together
Expand Down Expand Up @@ -214,14 +208,22 @@ collection.train()
Lastly, pass the collection of modules (`nlpm` instance) to the interpreter `nlpi`

```python
interpreter = nlpi(collection)
session = nlpi(collection)
```

class `nlpi` can be used with method `exec` for user input interpretation

```python

interpreter.exec('create a scatterplot using data with x dimension1 y dimension2')
session.exec('create a scatterplot using data with x dimension1 y dimension2')

```

***

The faster way, includes all loaded modules and groups them together for us:

```python
from mllibs.interface import interface
session = interface()
```

0 comments on commit e78f404

Please sign in to comment.