Introduction
“Turn your data preparation nightmares into a dream.”
Key features of Artifician ?
Simple Example
Without Artifician
import re
import string
from nltk.tokenize import word_tokenize
from nltk.corpus import stopwords
from nltk.stem import PorterStemmer
sample_texts = [
"Love this product! Absolutely fantastic.",
"Hated the experience. Terrible service!"
]
def clean_text(text):
text = re.sub(r'\d+', '', text) # Remove numbers
text = text.translate(str.maketrans('', '', string.punctuation)) # Remove punctuation
text = text.lower() # Convert to lowercase
return text
def remove_stopwords(tokens):
stop_words = set(stopwords.words('english'))
return [word for word in tokens if word not in stop_words]
processed_texts = []
for text in sample_texts:
cleaned = clean_text(text)
tokenized = word_tokenize(cleaned)
no_stopwords = remove_stopwords(tokenized)
print(no_stopwords)Using Artifician
Output
Original Text
Processed Text
Last updated