Text-Blob-Classifier
title: "Text Blob Classifier"
author: "Rj"
date: 2019-04-21
description: "-"
type: technical_note
draft: false
from textblob.classifiers import NaiveBayesClassifier
train = [
('I love this sandwich.', 'pos'),
('this is an amazing place!', 'pos'),
('I feel very good about these beers.', 'pos'),
('this is my best work.', 'pos'),
("what an awesome view", 'pos'),
('I …
Read More
Text-Classification-Nb
title: "Text Classification - Naive Bayes - Stackoverflow Tags"
author: "Rj"
date: 2019-04-21
description: "-"
type: technical_note
draft: false
# Disclaimer: some code copied form this https://towardsdatascience.com/multi-class-text-classification-model-comparison-and-selection-5eb066197568
import logging
import pandas as pd
import numpy as np
from numpy import random
import gensim
import nltk
from sklearn.model_selection import train_test_split
from …
Read More
Text-File-2-Nltk-Text
title: "Text File 2 NLTK Text"
author: "Rj"
date: 2019-04-21
description: "-"
type: technical_note
draft: false
f =open('canola.txt','r')
raw = f.read()
'OTTAWA—The federal Liberals promised Wednesday to give Canada’s canola farmers much-needed financial aid to help lessen the impact of China’s decision …
Read More
Text-Index-And-Slicing
title: "Text Index and Slicing"
author: "Rj"
date: 2019-04-21
description: "-"
type: technical_note
draft: false
f =open('canola.txt','r')
raw = f.read()
'OTTAWA—The federal Liberals promised Wednesday to give Canada’s canola farmers much-needed financial aid to help lessen the impact of China’s decision to …
Read More
Text-To-Vector
title: "Text to Vector"
author: "Rj"
date: 2019-04-21
description: "-"
type: technical_note
draft: false
content = "The Democrats — including more than 50 freshmen — are mindful that impeachment poses political risks that could endanger the seats of moderates and their majority, as well as strengthen Mr. Trump’s hand. "
Read More
Textblob-Classifier-2
title: "TextBlob Classifier 2"
author: "Rj"
date: 2019-04-21
description: "-"
type: technical_note
draft: false
from textblob.classifiers import NaiveBayesClassifier
from textblob import TextBlob
train = [
('I love this sandwich.', 'pos'),
('this is an amazing place!', 'pos'),
('I feel very good about these beers.', 'pos'),
('this is my best work.', 'pos'),
("what an …
Read More
Wav-2-Txt
title: "Wav 2 Text"
author: "Rj"
date: 2019-04-21
description: "-"
type: technical_note
draft: false
import speech_recognition as sr
from os import path
from pydub import AudioSegment
'''
How to install ffmpeg:
brew tap varenc/ffmpeg
brew tap-pin varenc/ffmpeg
brew install ffmpeg $(brew options ffmpeg --compact)
https://gist.github.com/clayton/6196167 …
Read More
Wiki-Bag-Of-Words
title: "Wiki Bag of Words"
author: "Rj"
date: 2019-04-20
description: "-"
type: technical_note
draft: false
import re
from nltk.tokenize import word_tokenize
from collections import Counter
article = """'\'\'\'Debugging\'\'\' is the process of finding and resolving of defects that prevent correct operation of computer software or a system. \n\nNumerous books …
Read More
Wiki-Bag-Of-Words-2
title: "Wiki Bag of Words 2"
author: "Rj"
date: 2019-04-21
description: "-"
type: technical_note
draft: false
import re
from nltk.tokenize import word_tokenize
from collections import Counter
article = """Natural lead consists of four stable isotopes with mass numbers of 204, 206, 207, and 208,[27] and traces of five short-lived radioisotopes …
Read More
Word-Average
title: "Word Average"
author: "Rj"
date: 2019-04-21
description: "-"
type: technical_note
draft: false
f =open('canola.txt','r')
raw = f.read()
'OTTAWA—The federal Liberals promised Wednesday to give Canada’s canola farmers much-needed financial aid to help lessen the impact of China’s decision to ban the …
Read More