Alex is an open source Natural Language Processing based command line access tool.
- To install alex, run the following in your terminal
git clone https://github.com/pratheekms/alex- Then navigate to alex directory and run setup
python setup.pysudo pip install -U nltksudo pip install unirestsudo pip install requestsAlex contains the following files (modules):
-
README - This readme file.
-
setup.py - contains code to copy files and install alex to your home or a custom directory.
-
LICENSE - GNU GENERAL PUBLIC LICENSE
-
alex - subdirectory containing files to process queries and perform operations. Within alex
- corpus.txt - contains corpus of queries in different forms for alex.
- category.txt - contains list of categories the processed queries can be mapped to (eg. count lines, file info etc).
- query.txt - set of queries and operations alex can execute.
- main.py - module to fetch user query, calls function to map user query to category and further execute the query.
- preprocess.py - module to remove stopwords and perform stemming operations on the query.
- handler.py - contains handler functions for the query based on the matched category.
- support.py - contains helper functions for the operations.
- web.py - module to use named entity recognizer(NER) to execute web queries.
- duckduckgo.py - module to use duckduckgo api to fetch results for generic queries.
alex locate filename
>By default I\'ll start searching from HOME directory.
>But this usually takes time.
>1 : Search from HOME directory
>2 : Search from a custom location
1alex find number of words in corpus.txtalex find the file index.php
>I\'m a little confused. Please enter a choice
>1 : Search for file by its name
>2 : Search for files with contain a keyword
1alex find the file with apple
>I\'m a little confused. Please enter a choice
>1 : Search for file by its name
>2 : Search for files with contain a keyword
2
>Enter keyword : applealex get me file info of index.phpalex what is the weather in london?alex who is Abraham Lincolnalex give me the system informationalex how many lines are there in corpus.txt?alex make main.py executablealex add /aost/project to path
>1 : confirm
>2 : cancel
1-
Maximum Line Length Limit all lines to a maximum of 79 characters.