Skip to main content

Posts

Showing posts with the label AI

OpenCV Tutorial

 OpenCV #as you can see the above image is not presented as the original # OpenCV #for exact representaition import cv2 from matplotlib import pyplot as plt import numpy as np img = cv2.imread(r'C:\Users\shrey\code\puppy.jpg') #loads the puppy image to img variable plt.imshow(cv2.cvtColor(img,cv2.COLOR_BGR2RGB)) plt.title("Cute Puppies") plt.axis("off") plt.show() #as you can see the above image is not presented as the original # OpenCV #for exact representaition import cv2 from matplotlib import pyplot as plt import numpy as np img = cv2.imread(r'C:\Users\shrey\code\puppy.jpg') #loads the puppy image to img variable plt.imshow(cv2.cvtColor(img,cv2.COLOR_BGR2RGB)) plt.title("Cute Puppies") plt.axis("off") plt.show() # OpenCV #for Gray image import cv2 from matplotlib import pyplot as plt import numpy as np img = cv2.imread(r'C:\Users\shrey\code\puppy.jpg',0) #loads the puppy image to img variable plt.imshow(img,cmap='g...

Natural Language Processing CBSE Class 10

Natural Language Processing We are leaning NLP! Tokens: We,are,learning,NLP,! Syntax means proper arrangement of words according to rules. Now when syntax makes sense it becomes semantics His future is very bright. (semantics) Data Processing 1) Pre-processing steps (Text Normalisation) Example words like slang,short form,misspelled,special meaning  character needs to be converted into canonical form.    Words Canonical form   b4,beefore,bifore           before Gni8                        Good night   tysm    Thank you so much gr8,grt                       great   Statement:   Gn tke care Perform text normalisation Answer: Good night take care. (corpus)   There are multiple steps for performing text normalisation: 1. Sentence Segmentation   2. Tokenization 3. Rem...