![]() A few people I've spoken with only want objective news and use word counts to determine how many emotional verbs a site uses and avoid using the site if it crosses a certain total words to emotional words ratio. We could also avoid using some news sources in particular if we want to avoid certain types of news. We could also scrape a specific news site, store results, and evaluate if we want to continue using the source of news for information,īecause we can now track (using word counts) exactly what the site thinks are important topics. TextMining_WordCounts -file "C:\files\DailyNews.txt" -table "DailyNews" -server "OURSERVER\OURINSTANCE" -db "OURDATABASE"Įach day, it would perform the word counts and store the results in the table with the dates logged. For instance, suppose that we received a text file called "DailyNews.txt" which came from various news' sites, we could call our function Now that we have our function, we mine files for words, get counts, and log the data. TextMining_WordCounts -file "C:\files\OurFile.txt" -table "OurTable" -server "OURSERVER\OURINSTANCE" -db "OURDATABASE" $scon.ConnectionString = "SERVER=" + $server + " DATABASE=" + $db + " Integrated Security=true" $sql_insert += "INSERT INTO $table (Word, WordCount) VALUES ('$k'," + $wrdc_mining + ")" + $nl $sql_insert = "IF OBJECT_ID('$table') IS NULL BEGIN CREATE TABLE $table (Word VARCHAR(250), WordCount INT NULL, WordDate DATE DEFAULT GETDATE()) END" + $nl $words = "'Twas the night before Santa's party, when the elves' tools ' malfunctioned in the shop." The below code strips these characters from the words. (appears 2 times) would be possible, when what we're ultimately looking for is Need to know that "done" (let's say appears 7 times) and "done." because we're looking at words and their counts, not the context and punctuation.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |