An application which takes as input a description of a scene in natural language and produces an image or scene giving a gist of that description.
Draw a rectangle of 100cm length and 50cm width and its color is green. there is a circle of blue color and its radius is 50cm. the circle is 200cm top of rectangle.
Output: Click Here.
-
Python 2.7
-
Python NLTK Library Installation
-
Run these commands in a python shell to get all the packages from NLTK
-
import nltk
-
nltk.download('all')
(Takes approx 20-30 minutes)
-
Python Turtle Library
-
PyCharm IDE (Preferred)
-
git clone https://github.com/abhishek-iitj/Text-To-Image-.git
-
cd Text-To-Image
-
Write the input text in "input.txt" (following the assumptions) (Read the assumptions here)
-
Follow these steps to see outputs of following algorithms
-
It will generate an image for the input text.
-
Run the files
phase2.py
first and thenClass_Files/main1.py
-
All the next algorithms will generate the intermediate results as the output and not the image.
-
It will generate the chunks as per the grammar rules defined in the file
file2.py
-
Run the file
file2.py
-
You can see the correct chunks of COL{Color}, MES{Measurements} in a separate window that pops up for each sentence.
-
It will generate the chunks as per the NLTK default taggers taking context into consideration.
-
Run the file
tagger.py
-
The output of different taggers (Default, Unigram, Bigram, Trigram, Hidden Markov Model and pos_tag Taggers) can be seen on the console.
-
It will generate the chunks as per the string matching on top of the output of NLTK POS_TAG function as per the grammar rules defined in the file
file4.py
-
Run the file
file4.py
-
You can see the correct chunks of COL{Color}, MES{Measurements} and SHAPE{Shapes} in a separate window that pops up for each sentence.
Please find the file btp cs399 report.pdf
in the directory. It contains the summary report submitted on 16.04.2018