Skip to content

WANT is a demo solution to translate news using IBM Watson Translation.

Notifications You must be signed in to change notification settings

isena/WANT-Server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WANT - WAtson News Translator

WANT is a demo solution to translate news from English to Portuguese using IBM Watson Translation.

Backend

The iOS app connects to backend application that was built with Node.js and is hosted on Bluemix and rely on:

Dependencies

Architecture Diagram

getNews

REST Endpoints

Get the latest news

GET /api/news
Sequence Diagram

getNews

Response (example)
{
  "success": true,
  "result": [
    {
      "type": "article",
      "sectionId": "football",
      "webTitle": "Joel Matip’s signing has saved Liverpool millions, claims Jürgen Klopp",
      "webPublicationDate": "2016-02-16T22:30:04Z",
      "id": "football/2016/feb/16/liverpool-joel-matip-jurgen-klopp",
      "webUrl": "http://www.theguardian.com/football/2016/feb/16/liverpool-joel-matip-jurgen-klopp",
      "apiUrl": "http://content.guardianapis.com/football/2016/feb/16/liverpool-joel-matip-jurgen-klopp",
      "sectionName": "Football"
    },
    {
      "type": "liveblog",
      "sectionId": "us-news",
      "webTitle": "Trump gives voice to 'Scalia-was-murdered' conspiracy – campaign live",
      "webPublicationDate": "2016-02-16T22:27:13Z",
      "id": "uk-news/2016/feb/16/tim-newton-rachel-slater-climbers-missing-ben-nevis-mountain",
      "webUrl": "http://www.theguardian.com/us-news/live/2016/feb/16/us-presidential-election-campaign-live-coverage-trump-cruz-clinton-sharpton-george-jeb-bush-south-carolina-primary-nevada-caucus",
      "apiUrl": "http://content.guardianapis.com/us-news/live/2016/feb/16/us-presidential-election-campaign-live-coverage-trump-cruz-clinton-sharpton-george-jeb-bush-south-carolina-primary-nevada-caucus",
      "sectionName": "US news"
    }
  ]
}

Get the article text

GET /api/news/:articleID
Sequence Diagram

getArticle

Response (example)
{
    "success": true,
    "result": {
        "originalText": "Apple rejects order to unlock gunman's phone..."
    }
}

Get the article translated text

GET /api/translate/:articleID
Sequence Diagram

getArticle

Response (example)
{
    "success": true,
    "result": {
        "translatedText": "Apple rejeita pedido para desbloquear o telefone do atirador..."
    }
}

Walkthrough

  1. Run the app;
  2. Select an article;
  3. read the original article;
  4. select translated and voilà!;
  5. select original to go back to original text.

Simple as that! Do you not believe? See bellow!

WANTgif

iOS App

Dependencies (cocoapods)
Support

The app was developed and tested with:

  • XCode 7.1.1 and XCode 7.2.1;
  • iOS 9 Simulator;
  • OS X El Capitan 10.11.1;
  • CocoaPods 0.39.0.

You can take a look at iOS app code here.

TODO

  • Improve HTML to plain text parser;
  • Support to other languages;
  • Local caching.

About

WANT is a demo solution to translate news using IBM Watson Translation.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published