Natural Language Processing Project

XZB

2022-05-20

1. JHU/SwiftKey Natural Language Processing Project

2. Procedure for Developing the App

3. Features of the App (1/2)

mostLikely <- TRUE
returnTable <- FALSE
test <- predictWord("go to the",mostLikely,returnTable)
test
## [1] "gym"
set.seed(12)
mostLikely <- FALSE
returnTable <- FALSE
test <- predictWord("go to the",mostLikely,returnTable)
test
## [1] "gym"

4. Features of the App (2/2)

returnTable <- TRUE
test <- predictWord("go to the",mostLikely,returnTable)
test
## # A tibble: 3,237 × 3
##    ngram               freq      p
##    <chr>              <int>  <dbl>
##  1 go to the gym         44 0.107 
##  2 go to the bathroom    41 0.0996
##  3 go to the beach       36 0.0874
##  4 go to the movies      36 0.0874
##  5 go to the store       27 0.0656
##  6 go to the hospital    25 0.0607
##  7 go to the mall        23 0.0559
##  8 go to the doctor      18 0.0437
##  9 go to the game        16 0.0389
## 10 go to the polls       13 0.0316
## # … with 3,227 more rows

5. Using the App

test <- predictWord("what the",mostLikely,returnTable)
test
## [1] "heck"
test <- predictWord("what can we",mostLikely,returnTable)
test
## [1] "do"
test <- predictWord("how can we",mostLikely,returnTable)
test
## [1] "be"