Advertisement
Guest User

Untitled

a guest
Jan 26th, 2015
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. article = """
  2. Senator johnson was caught stealing a smartphone on election night.
  3. witnesses say that he allegedly took the smartphone from a kindly old
  4. lady while she was washing her electric car. republican and democrat
  5. congressional leaders have vowed to hold hearings. Senator johnson could
  6. not be reached for comment.
  7. """
  8.  
  9. function translateNews(article::String, boringWords::Array, funWords::Array)
  10. article = lowercase(article)
  11. for i in 1:size(boringWords, 1)
  12. article = replace(article, boringWords[i], funWords[i])
  13. end
  14. return article
  15. end
  16.  
  17. println(translateNews(article,boring_news,xkcd))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement