This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import com.google.zxing.*; | |
| import com.google.zxing.client.j2se.BufferedImageLuminanceSource; | |
| import com.google.zxing.common.HybridBinarizer; | |
| import com.google.zxing.multi.GenericMultipleBarcodeReader; | |
| import javax.imageio.ImageIO; | |
| import java.awt.image.BufferedImage; | |
| import java.io.BufferedInputStream; | |
| import java.io.File; | |
| import java.io.FileInputStream; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from nltk import word_tokenize | |
| from nltk.corpus import reuters | |
| from sklearn.feature_extraction.text import TfidfVectorizer | |
| from nltk.stem.porter import PorterStemmer | |
| import re | |
| from nltk.corpus import stopwords | |
| cachedStopWords = stopwords.words("english") | |
| def tokenize(text): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ioMaybe :: Maybe a -> (a -> IO (Maybe b)) -> IO (Maybe b) | |
| ioMaybe (Just a) fn = fn a | |
| ioMaybe Nothing _ = return Nothing |