View prices.json
{ | |
"products": [ | |
{ | |
"productId": 1, | |
"purchaseable": true, | |
"prices": { | |
"usd": 1750, | |
"gbp": 1250 | |
} | |
}, |
View a_PhoneticTranslations_main.py
import urllib.request | |
import urllib.error | |
import urllib.parse | |
import re | |
from bs4 import BeautifulSoup | |
from bs4 import UnicodeDammit | |
lines = [] | |
base_url = "http://www.phonemicchart.com/transcribe/?w=%s" | |
output_file = open("output.txt", 'w', encoding='utf-8') |
View nltk_pos_workaround.py
import nltk | |
import re | |
from nltk.tokenize import word_tokenize, sent_tokenize | |
text = "I'm not going to the party." | |
words = word_tokenize(text) | |
pos_tags = nltk.pos_tag(words) | |
print (pos_tags) |
View ntlk_lemmatizer.py
from nltk.stem import WordNetLemmatizer | |
wordnet_lemmatizer = WordNetLemmatizer() | |
print (wordnet_lemmatizer.lemmatize("geese")) | |
print (wordnet_lemmatizer.lemmatize("bottles", 'n')) | |
print (wordnet_lemmatizer.lemmatize("said", 'v')) | |
print (wordnet_lemmatizer.lemmatize("better", 'a')) | |
print (wordnet_lemmatizer.lemmatize("quickly", 'r')) |
View nltk_tokenize.py
from nltk.tokenize import word_tokenize, sent_tokenize | |
text = "Hello, Mr. Jacobs. Nice to meet you!" | |
sentences = sent_tokenize(text) | |
words = word_tokenize(text) | |
print (sentences) | |
print (words) |
View a_language_analysis.py
import nltk | |
import re | |
from nltk.tokenize import word_tokenize | |
from nltk.stem import WordNetLemmatizer | |
input_file = "./input.txt" | |
words_file = "./words.txt" | |
output_file = "./output.txt" | |
curriculum_words = [] | |
pos_tagged_array = [] |
View output.txt
act | 0 | |
be | 6 | |
begin | 0 | |
believe | 0 | |
break | 0 | |
call | 0 | |
can | 5 | |
change | 0 | |
choose | 0 | |
clean | 0 |
View words.txt
act | |
be | |
begin | |
believe | |
break | |
call | |
can | |
change | |
choose | |
clean |
View input.txt
Ruby... Ruby, can you hear me? | |
Moli? Moli, where are you? | |
Moli? | |
Ruby, I've crashed. | |
Yeah... But where? | |
I'm hurt, Ruby. Can you find me? | |
Okay, I can see plants. | |
I can see rocks. |
NewerOlder