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

Jax 2018 – Just An Awesome Experience

What a week! From 23rd to 27th April our Berlin team attended the Jax conference in Mainz, Germany. We had such a great time sharing our fresh perspectives, in the form of a rousing keynote and two informative sessions. The concept of this annual event with over 2,000 participants, revolves around innovating with Java, architecture,...

Continue reading Jax 2018 – Just An Awesome Experience

CloudNativeCon and KubeCon are coming to Copenhagen!

With May just around the corner, mark your calendars for an exciting event, CloudNativeCon/KubeCon, in Denmark’s capital city of Copenhagen. Many of us in the Cloud Native community already visited this beautiful city for DockerCon EU last year and we’re excited to be able to take in all of the wonderful sites again this year....

Continue reading CloudNativeCon and KubeCon are coming to Copenhagen!

Live analytics with an event store fed from Java and analyzed in Jupyter Notebook

Event-driven analytics requires a data management system that can scale to allow a high rate of incoming events while optimizing to allow immediate analytics. IBM Db2 Event Store extends Apache Spark to provide accelerated queries and lightning fast inserts. This code pattern is a simple introduction to get you started with event-driven analytics. You can...

Continue reading Live analytics with an event store fed from Java and analyzed in Jupyter Notebook

Related Links


Building secure server-side Swift apps for Cloud