Use Swift to interpret unstructured data from Hacker News  

Use cognitive APIs to gain insight into tech trends on Hacker News with a twist

Last updated | By Ishan Gulane


Getting insights from large amounts of unstructured data sources is getting easier to do because of machine-learning technologies. Learn how to pull data points — concepts, entities, categories, keywords, sentiment, emotion, etc. — from Hacker News articles using natural-language service calls from a Swift-based application.


“Natural Language Processing (NLP) is a field that covers computer understanding and manipulation of human language, and it’s ripe with possibilities for news-gathering,” Anthony Pesce said in Natural Language Process in the kitchen. NLP enables developers to organize and structure knowledge to perform tasks such as named entity recognition, relationship extraction, sentiment analysis, and speech recognition. The application of NLP is being used in many fields, including medicine, law, and others where there are vast amounts of unstructured data users need to quickly pull information from.

Typically, we have seen applications that utilize NLP APIs built in Python or Node.js. This journey has a twist by introducing you to embedding machine-learning capabilities in a Swift-based application. You will use the Watson™ Natural Language Understanding API to interpret unstructured text from Hacker News to identify the latest trends and key topic areas discussed by developers. You will see how easy it is to call this service from a Swift application.


  1. The user deploys the application to IBM Cloud®.
  2. Application loads the data from the Hacker News API.
  3. The user interacts with the application UI using a browser.
  4. When the user performs any action, UI calls the server application API, which uses the Watson NLU service to analyze the respective news article.

Related Blogs

Related Links


Building secure server-side Swift apps for Cloud