"No one is harder on a talented person than the person themselves" - Linda Wilkinson ; "Trust your guts and don't follow the herd" ; "Validate direction not destination" ;

July 19, 2018

Day #118 - Synonym verbs check

from itertools import chain
from nltk.corpus import wordnet
import nltk
sentence = "I am buying this book"
tokens = nltk.word_tokenize(sentence)
tagged = nltk.pos_tag(tokens)
length = len(tagged)
verbs = list()
#https://stackoverflow.com/questions/15388831/what-are-all-possible-pos-tags-of-nltk
#VB verb, base form take
#VBD verb, past tense took
#VBG verb, gerund/present participle taking
#VBN verb, past participle taken
#VBP verb, sing. present, non-3d take
#VBZ verb, 3rd person sing. present takes
print(tagged)
for i in range(0, length):
print(tagged[i][1])
if(tagged[i][1] == 'VB' or tagged[i][1] == 'VBD' or tagged[i][1] == 'VBG' or tagged[i][1] == 'VBP' or tagged[i][1] == 'VBZ'):
verbs.append(tagged [i][0])
print(verbs)
for word in verbs:
synonyms = wordnet.synsets(word)
lemmas = set(chain.from_iterable([word.lemma_names() for word in synonyms]))
print('Word in Context')
print(word)
print('Similar Synomynms')
for word in lemmas:
print(word)
view raw Synonymverbs.py hosted with ❤ by GitHub
Happy Learning!!!

July 18, 2018

Day #285 - Experimenting on Custom Segmentation using Unet

1. Data Annotation - Leveraged tool - eraseimage by Akshay Bhat (Nice Effort)

Pick Green - Foreground, Red - Background to mark regions


Segment and Save the Output Image

Step 2 - Labelling in Sequence (Follow the same structure replace with Image / Label) - Labelling Training from 0 to 28


3. Labelling Test from 0 to 4


Performed a rename as all files were in jpeg, used ren *.* to *.png to port to png format

4. Performed Data Augmentation and took those masked images and labels (Replaced Earlier ones)



Output Results



Happy Learning!!!