[WEBINAR] Join us on March 21 and discover the power of professional low-code for e-commerce development. REGISTER NOW
Home » System Integration » Data and Process Integration » 13 Helpful Tips For Implementing Artificial Intelligence On IBM i
Home / Blog / 13 Helpful Tips For Implementing Artificial Intelligence On IBM i

13 Helpful Tips For Implementing Artificial Intelligence On IBM i

by | Jan 29, 2022 | Application Modernization, Data and Process Integration | 0 comments

Regardless of their size, today’s enterprises know that they must adapt to changing market conditions to remain competitive. Generally, this includes making the best use of business data by adopting modern technologies like artificial intelligence and Big Data. Especially over the past few years, advancements in AI and machine learning have changed the way businesses obtain and utilize data. Today, in particular, many organizations employ these technologies to gain business insights, drive better decision-making, and ultimately increase ROI. 

However, adopting modern solutions can be very challenging. This is certainly true for companies that run their mission-critical business applications on the IBM i platform. This is because IBM i applications are generally monolithic. As a result, isolated data sources, or data silos, make it difficult to integrate existing applications with solutions like AI and machine learning. 

Obviously, in a world where unlocking business opportunities is the order of the day, you can’t risk getting left behind. Moreover, the emergence of AI and artificial intelligence represents a realm of limitless opportunities for enterprises. But, taking advantage of these opportunities means modernizing legacy systems. Modernization, however, means different things to different organizations. Each business must employ application modernization strategies that meet its specific business needs. For many, leveraging APIs is a great strategy for implementing artificial intelligence on the IBM i. It’s a good thing that LANSA provides an easy way to connect APIs with your IBM i system.

This article discusses 13 helpful tips for implementing artificial intelligence on the IBM i. But before we dive right in, let’s look at how you can leverage APIs with LANSA. 

How do I use REST APIs with LANSA?

A RESTful API – or RESTful web service – is a Representational State Transfer (REST)-based application program interface that uses HTTP requests to GET, PUT, POST, and DELETE data.

REST APIs, regardless of protocol, are popular among developers due to their versatility and the fact that they do not require you install additional applications or libraries.

In order to help you understand how you can connect APIs from within Visual LANSA, here is some sample code for executing the Google Geocode REST API:

 

Define_Com Class(#XPRIM_HttpRequest) Name(#Req)


Define_Com Class(#XPRIM_RandomAccessJsonReader) Name(#Reader)


#Req.DoGet Url('https://maps.googleapis.com/maps/api/geocode/json?...')

* Check if request is successful

If (#Req.Response.IsSuccessHttpStatusCode)

* Set the JSON reader source for response from the HTTP request

#Reader.SetSourceHttpResponse HttpResponse(#Req.Response)

* Navigate to the 'location' object (containing the 'lat' and 'lng' values)

* We'll specify a navigation path to navigate to the 'location' element

* Names and indexes in a path are separated by forward slashes

#Reader.BeginObjectWithPath Path('results/1/geometry/location')


* Get the latitude and longitude value

#Latitude := #Reader.ReadNumberWithName('lat')

#Longitude := #Reader.ReadNumberWithName('lng')


* Close "BeginObject" with "EndObject"

#Reader.EndObject

Endif

If you want to find out more about connecting to a REST API from within Visual LANSA, then check out the documentation here:

(https://docs.lansa.com/15/en/lansa018/content/lansa/webserviceseng01_0085.htm)

Why Are Low Code Platforms The Answer To Artificial Intelligence on IBM i?

According to a report [1] by MMC Ventures, the demand for AI talent has more than doubled in 2018-2019. More importantly, it continues to increase, with 60% of all AI specialists being absorbed by companies in the technology and financial services sectors. The pool of AI talent, however, remains small. Because AI demands advanced competencies in mathematics, statistics, and programming, the entry threshold level for this profession is really high. In addition, educational institutions aren’t able to produce capable and qualified graduates fast enough to satisfy the business demand. 

This is where low code platforms like LANSA come in. Low-code makes AI technologies instantly accessible even to small and medium-sized companies. It also allows businesses to build custom applications and integrate different elements of AI and machine learning (ML) using third-party APIs. 

If you want to learn more, then read these articles about the role of low-code in the adoption of artificial intelligence. 

What are other ways I can incorporate AI and APIs through LANSA?

You can incorporate AI on your IBM i using the following tools:

1. How Can I Add Color to Black and White Images or Videos Using AI?

DeepAI Image colorization API lets you colorize black and white images or videos. In this way, you can add color to old business photos and historical images. You can also bring an old film back to life with colorization. Best of all, you can connect to this API from within Visual LANSA using the same code we showed above.

https://deepai.org/machine-learning-model/colorizer 

2. How Can I Detect Image Similarity Using AI?

Using LANSA, you can also leverage the DeepAI Image similarity API on any of our client and server deployment platforms. This API compares two images and returns a value that tells you how visually similar they are. The lower the score, the more contextually similar the two images are, with a score of ‘0’ being identical.

https://deepai.org/machine-learning-model/image-similarity

3. How Can I Improve Image Quality with AI?

DeepAI super-resolution API helps you clarify, sharpen, and upscale a photo without losing its content and defining characteristics. Like the others, you can also connect this API with your IBM i system from within Visual LANSA.

https://deepai.org/machine-learning-model/torch-srgan 

4. How Do I Automate Fast Neural Style Transfer?

Next, the DeepAI fast style transfer API quickly applies an artistic style to an image. Once again, you can implement this on LANSA using any of our client and server deployment platforms.

https://deepai.org/machine-learning-model/fast-style-transfer

5. How Can I Automate Image Captioning?

Another AI tool, the DeepAI densecap API captions an image by labeling every object the model detects is present within the image. It outputs the labeled image along with a JSON snippet. This snippet includes each label and its coordinates within the image. By integrating this API from within Visual LANSA, you can quickly automate image captioning. 

https://deepai.org/machine-learning-model/densecap 

6. How do I toonify faces using AI?

Then there is the DeepAI toonify API. It works on any LANSA client and server deployment platform.  These include Windows, Linux, and IBM i, and Windows, iOS, and Android, as well as the web.

https://deepai.org/machine-learning-model/toonify

7. How Can I Create a Chatbot?

If a chatbot is what you are after, then integrate the Google Dialogflow API. With LANSA, you create design agents that let you explicitly control a conversation. If you want to see more, then check out the Google documentation here. 

https://cloud.google.com/dialogflow/cx/docs/quick/api

8. How Can I Automate Speech to Text Transcription?

Then there is the Google Speech To Text API. It lets you send audio and returns a text transcription. You can leverage LANSA to integrate this Google service with your IBM i applications.

https://cloud.google.com/speech-to-text/docs/samples/speech-quickstart#speech_quickstart-python

9. How Can I Analyze Sentiment?

Google Cloud Natural Language API is another useful tool that analyzes sentiment in a string. You can integrate natural language technologies in your IBM i systems through LANSA on any of our client and server deployment platforms, including Windows, Linux, and IBM i, and Windows, iOS and Android, as well as the web.

https://cloud.google.com/natural-language/docs/samples/language-sentiment-text#language_sentiment_text-python

10. How Can I Detect Labels in Local Image?

The Google Cloud Vision API is another AI tool that works on any LANSA client and server deployment platform. These include Windows, Linux, and IBM i, and Windows, as well as iOS, Android, and the web.

https://cloud.google.com/vision/docs/labels?hl=bg#vision_label_detection-python

11. How Can I Generate AI Face Photos?

If you are looking for photos you can use safely in any of your projects, then integrate the Generated Photos API. As usual, this also works across the LANSA platform on any operating system you choose. 

https://generated.photos/api

12. How Can I Automate Text (printed or handwritten) Reading?

If you are looking to automate text reading, whether handwritten or printed from an image, then the Computer Vision API is the solution for you. It extracts information from images and returns it as a string. As with the others, Visual LANSA also makes this API easy to quickly integrate with your IBM i applications.

https://docs.microsoft.com/en-us/azure/cognitive-services/computer-vision/quickstarts-sdk/client-library?pivots=programming-language-rest-api&tabs=visual-studio  

13. How Can I Analyze Images Using AI?

Finally, the Computer Vision API also extracts visual features from images. This includes objects, faces, adult content, and even auto-generated text descriptions. It is another tool you can easily leverage within Visual LANSA.

https://docs.microsoft.com/en-us/azure/cognitive-services/computer-vision/vision-api-how-to-topics/howtocallvisionapi 

Are You Ready To Implement Artificial Intelligence on Your IBM i?

To be sure, AI is the way of the future. According to a report by Gartner, by 2024, 75% of enterprises will shift towards running on artificial intelligence. In other words, AI may become the only solution for obtaining, analyzing, and effectively utilizing your data.

Without a doubt, the IBM i platform has been serving enterprises well for decades. As a result, it has collected large amounts of enterprise data. However, data integration can be challenging with legacy IBM i systems. Fortunately, LANSA offers a way out. Its numerous modernization solutions can enable the upgrade of your systems to facilitate the adoption of AI solutions. What’s more, you can build more efficient business line applications that support integrations. You can also use the API code generator to build APIs quickly with LANSA.

Contact us for more information on how you can incorporate AI in your IBM i applications. 

 

[1] https://www.mmcventures.com/wp-content/uploads/2019/02/The-State-of-AI-2019-Divergence.pdf

RECOMMENDED POSTS

0 Comments

Submit a Comment