1 Introduction

Soft computing (SC), introduced by Yager et al. (1994), is endeavoured to provide the imprecision of the real world (Zadeh 1996). It provides a reliable solution for complex problems such as estimation with adequate precision (Naderpour and Mirrashid 2020b). It comprises of three models fuzzy systems, artificial neural network (ANN) and optimization algorithm. The ANN model computations are inspired by the biological neural network of the brain. It provides approximate solutions for a nonlinear function as it comprises of several neurons as nonlinear components (Siddique and Adeli 2013). It has applications in various diverse areas such as control (Kim et al. 2019), classification (Naderpour and Mirrashid 2019), biology (Dunn et al. 2019), construction (Naderpour et al. 2018), secure data aggregation and efficient data processing in the large-scale wireless sensor network (Shobana et al. 2020), remote sensing image classification of natural terrain features (Kundra and Sadawarti 2015), electric load forecasting (Zhang and Hong 2019; Dong et al. 2018) and forecasting the motion of a floating platform (Hong et al. 2019). Fuzzy systems are based on the ability of human brain reasoning. To determine the fuzzy output of nonlinear system provided with an input vector uses a rule-base (Gorzalczany and Gluszek 2002). These techniques can be merged to form a hybrid model such as a neuro-fuzzy model. This hybrid model is used in several application areas such as strength (Naderpour et al. 2019), earthquake (Polykretis et al. 2019), power amplifier (Galaviz-Aguilar et al. 2019), security threats detection (Neelaveni and Sridevi 2019), speech recognition (Asemi et al. 2019), machine translation (Singh et al. 2019b) joints (Naderpour and Mirrashid 2019) and columns (Naderpour and Mirrashid 2020a). The computational intelligence problems also involve soft computing approach to solve such complex problems (Naderpour and Mirrashid 2020b). One such computational intelligence problem is natural language processing (NLP); it involves computers to understand and process the text in natural language such as German, French, Sanskrit, Hindi, Tamil and Telugu. It is a multidisciplinary field involving computer scientist and computational linguistics as shown in Fig. 1. The goal of NLP is to build a computational model for its analysis and generation. NLP involves technological motivation for developing intelligent computer system such as machine translation, sentiment analysis, information extraction, question answering system and speech recognization as exhibited in Fig. 2. There is also cognitive and linguistic motivation for processing natural language. It involves natural language understanding and its generation as in Fig. 3. Machine translation (MT) is one of the many applications of NLP (Bharati et al. 1995; Chowdhury 2003). MT is a process of translating source language to target language using computing technology. Human translators or editors can be involved in the process of MT, although minimal human aid is the goal of MT. The field of man–machine interaction and artificial intelligence involves the processing of natural language. A translation provided by the MTS involves both syntactic and semantic aspects of language to ensue for the correctness of the translation. Cloud computing is a model which enables ubiquitous, convenient, on-demand network access to a shared pool of configurable computing resources (networks, servers, storage, applications and services) that can be rapidly provisioned and released with minimal management efforts or service provider interaction (Fox et al. 2009). Clouds are classified based on service type or deployment type (Foster et al. 2008). It consists of three service models SaaS, PaaS and IaaS (Ahmad and Ranka 2016; Rimal et al. 2009).

Fig. 1
figure 1

Natural language processing

Fig. 2
figure 2

Natural language processing involving translation

Fig. 3
figure 3

Natural language processing applications

Fig. 4
figure 4

Need for cloud computing in machine translation systems

1.1 Need of MT deployment on cloud

Numerous applications are being deployed on cloud nowadays as listed in Table 1. It includes MT application offered through the cloud and its outcome achieved by reducing the deployment time and auto-scaling of applications.

Many factors are governing the need for MTS deployment on the cloud such as deployment faster and easier, handling of frequent updates, manageability, speed, reliability, quality of service (QoS), enhancement, rapid provisioning, elasticity and resilience also exhibited in Fig. 4. An experiment on deploying MT system (Hindi to Punjabi) on the cloud was conducted. It took a book of 70 pages to translate on stand-alone machine 71 min, whereas on the cloud it turned down to 5 min (Kumar et al. 2013c). Hence, deployment of MT systems on the cloud is a viable option for future users.

1.2 Problem statement

MT is a highly compute-intensive application including less amount of input data but more processing. Therefore, such applications when processed on a simple computer do not offer adequate performance and accuracy of the application. MTS consists of various heterogeneous modules which comprise of large code blocks. It is a complex NLP application containing heterogeneous modules. Deployment of such a complex system on the stand-alone system is cumbersome, time-consuming and knowledge intensive. It takes hours to load, configure and run the system. To overcome, MTS can be configured on cloud infrastructure to exhibit better accuracy and performance. This will facilitate the auto-scaling of computational resources for changing load conditions (Ahmad 2013). The deployment on cloud to deliver Quality of Service (QoS) to the end-user.

1.3 Contribution

Neural machine translation (NMT) has been outperforming traditional statistical phrase-based and RBMT (Singh et al. 2019a). Driven by its performance, we implemented a neural model by training linguistic rich features drawn from the rule-based system for Indian language pair, i.e. Sanskrit–Hindi. After the development of MTS, we build a website for a better user experience. Later, the web interface was deployed on the cloud to provide the MTS as a service.

  • Initially parallel corpus was gathered which was available from different sources and rest of the data was manually created for building a neural model using encoder–decoder architecture with attention mechanism (Ahmad et al. 2011a).

  • We trained and tested the NMT system with different models, activation functions, training data, epochs, sentence lengths to yield better accuracy of the proposed system.

  • We then merged linguistic tools output from the classical rule-based approach as features embedding matrices in NMT to test whether it guides for the disambiguation translation of words as the same word may have a different meaning in a different context. We also tested whether it reduces the data sparseness and performs meaningful tokenization.

  • An web interface was developed for better user-interface.

  • The web interface was deployed on AWS cloud with EC2 which eases time, knowledge and complications. It even becomes challenging for a common user to utilize such a complex application. It elevates the MTS performance by managing recurrent changes in term of either corpus, domain, algorithm and rules.

As the workload increases changing the deploying environment is needed for such complex compute-intensive applications. It improves throughput, response time and reduces deployment time. These systems are offered by both academic and commercial organizations and have been providing services to the end-users.

Table 1 Existing deployment of applications on clouds

1.4 Paper organization

The remaining of the paper is designed with review of the existing state-of-art literature in Sect. 2. Section 3 demonstrates the proposed Sanskrit to Hindi MTS as a Service. Section 4 describes its experimental details along with its results in Sect. 5. Lastly, the paper is concluded in Sect. 6.

2 Review of the existing work

2.1 MTS on cloud

The MTS development is prominently using deep neural network-based approach It has been producing significant improvement in the results after statistical MT. These systems deployed on the cloud provide a scalable service with various benefits. Some of the translation system earlier deployed on the cloud has been discussed in this section. Kiyurkchiev et al. (2019) developed a DisPeL learning portal which is an e-learning portal for learners and tutors. It is implemented using a combination of Angular 4 and a proprietary SPA framework based on jQuery and vanilla JavaScript. It provides better scalability and cognitive services like automatic translations and search. The advanced reporting instruments via dedicated reporting databases and PowerBI. The application skeleton is developed in NET Framework 4.6. The system provides a quick implementation of report generator job as another type of application, supported by NET Core. Huang et al. (2019) provides a scalable model-parallelism library for training giant networks. The single model achieved 84.4% and top-5 validation accuracy with single-crop 97%, the re-computation time 23%, load imbalance 3.2% and minimizes the performance overhead. Chen et al. (2019) provides a fully synthesizable C++ template library with the considerations of FPGA implementation. An optimized system configuration is developed to maximize overall performance. The software stack is merged with the DNN accelerator, to provide a complete system-level solution for the users who need acceleration services. Vaswani et al. (2018) developed a library by Google Brain and DeepMind. This library of deep learning models and datasets designed to make deep learning research faster and more accessible Tensor to Tensor uses TensorFlow throughout the implementation. It benefits the researcher to train models on CPU, GPU (single or multiple), and TPU, locally and in the cloud, usually with no or minimal device-specific code or configuration. There have been a strong focus on performance as well as usability. The future work may reduce this scaling factor of encoder and decoder model. Venugopal and Zollmann (2009) proposed an end-to-end grammar-based statistical MTS running on Hadoop. This system was able to scale to build grammars for large scale in reasonable time frames. Ferrández-Tordera et al. (2016) proposed CloudLM, an open-source cloud-based language model intended for MT with distributed architecture. This proposed system is stable, robust and is very efficient. Ahmad et al. (2011b) proposed a Map reduced based framework for machine translation which enhances the throughput of the system. Kumar et al. (2013b) proposed a MTS using MapReduce Framework to assure QoS. With the experimental analysis, they show that job completion time for any translation is within a fixed time limit irrespective of its size. There are a few others MTS proposed with cloud-based framework (Ahmad et al. 2011a; Kumar et al. 2013a, c; Vasiļjevs et al. 2011) to achieve better performance for current MTSs. Another experiment of deployment by Ahmad et al. (2014) using Storm, a distributed computing framework is used for deploying on cloud. It reduces job completion time, gives very good user experience by web interface and response time. The elapsed time for a translation job after the submission of the job is 4 s. In a future modification of the storm topology to apply parallelism at word level processing, different MT systems developed on the cloud have been compared based on their techniques used, technical specifications employed and the outcome achieved with their limitations and future work. A comparative analysis of various cloud-based approaches for MT is presented in Tables 2 and 3.

Table 2 Existing work of machine translation deployed on cloud
Table 3 Existing commercial MTS: a comparative study

2.2 MTS for the Sanskrit language

In this paper, Sanskrit–Hindi hybrid MT system is proposed where hybrid mechanism (a combination of linguistic and neural-based) will be applied for translation and cloud resources are used for processing and computation for translating Sanskrit to the Hindi Language. Sanskrit is one of the oldest Indo-European languages. In Uttarakhand, Sanskrit is used as their official language and it is also known as the mother of the other languages. This language was used by Hinduism, Buddhism and Jainism in their holy books, Vedas and other philosophical texts. One language helps to unite the world culturally, technologically and socially and MTS is used for the same purpose. A very few researchers developed systems for translation of ancient morphological rich language, i.e. Sanskrit. Early efforts included the use of a rule-based approach for translation of English–Sanskrit. Rathod and Sondur (2012) involves parsing of the sentence performed along with the module such as a token generator, vichcchceda, translator and in the final phase the translated output is converted speech output. For smaller and simple sentences, translation provided is correct. Complex sentences cannot be handled by the system. There is no information regarding the semantics of the text. This drawback was overcome by Barkade and Devale (2010) with the semantic mapper, translator, composer and lexical parser. Information can be obtained through introspection and analysis. Semantic analysis is considered in this system and provided by the system for translation. Accuracy of the entire system is dependent on each module. E-Trans system (Bahadur et al. 2012) based on formulation of context-free grammar. The results produced by this system were quite promising for small and large sentences of English to Sanskrit. For handling spoken translation, English–Sanskrit translation system and synthesizer (Rathod and Sondur 2012) is developed. It consist of various modules for processing such as a token generator, parser generator, RBMT/EBMT engine, bilingual database, text output and waveform generator. The research work is useful for sharing worldwide knowledge with Indian translation approach. Another system for speech translation, TranSish (Upadhyay Pankaj 2014) provides an interactive interface for people to interact with the Sanskrit language in speech form. It provides translation for the present tense only. Employing example-based approach ANN and rule-based model for English–Sanskrit translation (EST) were developed where they proposed detection rules using ANN mechanism for divergence related sentences and implemented some rules for its adaptation (Mishra and Mishra 2009). Feedforward ANN to make a selection of Sanskrit words and adjective from English to Sanskrit user data vector (UDV). Evaluation measures are used to calculate the performance of the system; BLEU provides 0.325 accuracies for a random sentence, precision, recall and F-measure provides 0.8, and METEOR provides 0.811. This system provides translation for an English sentence of only 6 types of sentence structure. The current research work integrates ANN with java. To improve typo errors, CBS (case-based reasoning) and data mining techniques can be considered to integrate for the future work. All these systems were developed for translating English–Sanskrit. There are very few attempts for translation of Sanskrit to Hindi. A proposed SaHit-statistical approach for Sanskrit–Hindi translation (Pandey and Jha 2016) where they trained their system on the platform—the Microsoft Translator Hub (MTHub) for only simple Sanskrit prose texts. This system takes input only in Devanagari Unicode Script and gives output in same. Sometimes the system does not response to long and compound sentences. In this work, MTS is proposed which handles all the limitations of the existed MTS developed for the Sanskrit language.

3 Sanskrit–Hindi hybrid machine translation system (SHH-MTS) as a service

The MTS improves performance through recurrent changes in term of either corpus, domain, algorithm and rules. These rapid changes are very difficult to be updated in stand-alone MTS. To facilitate this problem, we have proposed that it must be deployed on cloud to provide quality of service (QoS) to the end-user. Firstly, Sanskrit–Hindi hybrid machine translation system (SHH-MTS) architecture is designed and developed. Later, post-development it is deployed on cloud to test and analyse its performance on various parameters such as throughput, server load, response time and CPU utilization.

3.1 Characteristics of Sanskrit–Hindi machine translation system

There are different characteristics listed for Sanskrit–Hindi machine translation system (SHH-MTS)

  • The SHH-MTS developed is the integration of linguistic rich features with prominent result-oriented approach, i.e. rule-based and neural-based which is gaining significant attention nowadays.

  • As source language, Sanskrit is a linguistically rich language having old scriptures like Vedas written in this language, which are not accessible and understandable to general people. Through SHH-MTS, the old scriptures can be easily accessed in other languages.

  • The proposed system also benefits the teaching–learning process by assisting with Sanskrit content. The system aids the students by illustrations of grammatical information for the Sanskrit text such as parts-of-speech tagging, parsing, Sandhi-splitting, word sense disambiguation and relations between different words of a sentence.

  • The system is readily updated with recurrent frequent updates of performance in the term is corpus, domain, algorithm and rules.

  • The SHH-MTS is deployed on the cloud and provided as a service. It enhances the deployment making it easier to perform and easy to use by the common user as no pre-requisite or knowledge of NLP required.

  • Auto-tuning for neural-based MT used in our proposed system is not possible at the local host due to memory issues, but it is possible on the cloud. Several layers are added automatically to attain maximum accuracy and high speed.

The following sections contain the details of entire SHH-MTS developed in phases, i.e. different linguistic tools output feed for embedding as features in the encoder of neural-based encoder–decoder architecture which trains the systems for learning and predicting the translation of Sanskrit words into Hindi words using linguistic features.

3.2 SHH-MTS: rule-based machine translation system; extraction of linguistic features

The rule-based system follows pipeline architecture, each module or tool has been described in this section. Different linguistic tools have been used as input features in neural machine translation (NMT) to train system more efficiently. Some linguistic features are language specific, i.e. Sandhi-splitter. These tools are mostly rule-based developed under Project funded by MIT. We have also developed a web interface for better user experience using Anusaaraka Engine (Chaudhury et al. 2010) for providing translation to common users.

  • Pre-processing of user input: It takes input from user, cleanses, normalize the text, converts the input notations into WX notation, call and invokes MT system which performs computation and shows the output result.

  • Tokenizer: Tokenizer receives a flow of character and that character breaks into individual words called as tokens (words, punctuation, markers). It removes the formatting information and add a sentence tag. Here, the term morphology is used for linguistics. It refers to study of words, their internal process and their word meaning. The model has stream of words those words are tokenized first and then morphology gives meaning to those words (Pappu and Sanyal 2008).

  • Sandhi-Splitter: It is invoked only when input text contains Sanskrit sandhied words. It splits these words as well as compound words (Sachin 2007; Kumar et al. 2010).

  • Morphological Analyser: It splits into roots and grammatical suffixes. There are different units, and one of each unit provides meaning as well as grammatical function. It also provides inflectional analysis, prunes the answer, uses local morph analysis to handle unrecognized words and produces derivational analysis of the derived roots (Bharati et al. 2006; Mittal 2010; Jha et al. 2009).

  • Parsing: Parser is used as compiler and interpreter that break data into smaller units for easy translation of one language to another. Parsers takes input from the sequence of words or tokens those inputs are translated in the form of parse tree or an abstract syntax tree. It converts the source language to target language in the form of tree like noun, verbs and attribute. It produces morph analysis according to context along with karaka analysis. According to computational Paninian grammar, it identifies and names the relation between verb and its participants (Kulkarni et al. 2010; Goyal et al. 2009; Kulkarni and Kumar 2011; Kulkarni and Ramakrishnamacharyulu 2013; Kulkarni 2013).

  • Shallow Parsing: If the parser fails on any input, it does minimum parsing of the sentence and produces pruned morph analysis to the next layer (Huet 2006; Kumar et al. 2010; Kulkarni et al. 2010).

  • Word Sense Disambiguation (WSD): The modules performs word sense disambiguation of input sentence words roots, vibhakti and lakara. Identifies correct sense of a Sanskrit word (Bharati and Kulkarni 2007).

  • Parts of Speech Tag (POS): It adds parts of speech tags to each word such as adjective, verb or noun. tags (Hellwig 2009, 2010).

  • Chunker: This phase performs minimum grouping of words in a sentence such as noun phrase, verb phrase, adjective phrase. The rule base allocates a appropriate chunk tag to it. Nandi and Ramasree (2013).

  • Hindi Lexical Transfer: The Sanskrit Lexicon is transferred to Hindi identifying root words using dictionary. The output is formatted according to Hindi Generator, which generates the output in Hindi Language corresponding to the Sanskrit language. This module also performs transliteration in case translation fails (Kumar et al. 2009).

  • Hindi Generator: This phase involves sentence-level generator performs agreement between noun, adjective and verb in the target language; addition of vibhakti markers ’ne’ and dropping ’ko’ at required positions. Final generation involves root words and their associated grammatical features, corresponding suffixes and concatenates them and also concatenates the generated words into a sentence (Bharati and Kulkarni 2007).

Hence, translation of each Sanskrit word to its corresponding Hindi word is performed using linguistic rules and tools. Further, these data are passed to consequent phase. The data passed to the next phase are converted into comma-separated values (CSV) format suitable for training, model development and fitting the values for neural-based encoder–decoder architecture for predicting translation of Sanskrit word to Hindi word. These linguistic tools output is embedded as features for input encoding of source sentence as they help better in disambiguation of words.

Fig. 5
figure 5

Flow chart of proposed system

3.3 SHH-MTS: neural network-based RNN approach

The encoder–decoder recurrent neural network consisting of encoder reading a variable length input sequence and decoder predicting a variable length output sequence. The dense output layer is used to predict each character in the output sequence in one time rather recursively during training. Firstly, we define a model and once it fits it can be used to make translation predictions. The model defined for training has learned weights for this operation, but the structure of the model is not designed for calling recursively to be generate one character at a time. The encoder model takes input layer from the encoder in the trained model and gives output as hidden layer and cell state tensors. On the other hand, decoder needs hidden layer and cell state from encoder as initial state for the model defined. Both the encoder and decoder will be called recursively for each character that is to generated in the translation sequence (Cho et al. 2014).

The neural network encoder–decoder architecture with bidirectional RNN (Bahdanau et al. 2014) is implemented for predicting Hindi translation corresponding to Sanskrit translation. It consists of grated recurrent units (GRU) for computation. The implementation (Bahdanau et al. 2014) consists of input sequence feed with linguistic features (Sennrich and Haddow 2016). Given a source sentence \(x=(x_1,x_2,\ldots ,x_m)\) is read and computes hidden states for forward direction (\(\vec {h}_1\), \(\vec {h}_2\), \(\vec {h}_3\ldots \vec {h}_n\)) and for backward states . The detailed computations have been displayed in Algorithm. Both of these forward computation and backward computation are then merged to form an annotation vector (\(h_i\)) as explained in Algorithm 2. The encoder input was a combination of linguistic features formed as feature embedding matrices as computed in Algorithm 3. The decoder further predicts the target sequence \(y=(y_1,y_2,\ldots ,y_n\)) based on context vector (\(c_i\)) computed in Algorithm 4 from weighted sum of annotations \(h_i\), recurrent hidden state (\(s_i\)) and previously computed word \(y_{i-1}\). The alignment model (\(a_{ij}\)) models the probability that \(x_j\) is aligned to \(y_i\) or not as in Algorithm 5. It is feedforward single layer network learned through back-propagation. The output is predicted using learned distribution. The implementation was carried out with Tensor flow (Abadi et al. 2016) at back end with Keras (Ketkar 2017) using encoder–decoder architecture for developing the system. In addition, we have considered the state constraints in order to minimize the computational complexity and generalized the results inspired by the work (Sun et al. 2018).

$$\begin{aligned} d_{i,iz}=f_{i}(w_{s})+F_{i,z}(W_s,\bar{W}_{s}-1) \end{aligned}$$
(1)

where \(i=1,\ldots ,n \), \(ji=1,\ldots ,{s_{i}-1}\), \(s_{i}>1\),\(n>1\) and both \(s_{i}\), n are positive integers.

$$\begin{aligned} d_{i,ji}=d_{i,ji+1}+F_{i,ji}(\bar{d}),ji. \end{aligned}$$
(2)

Here, \(d=[d_{i},ji,\ldots ,\bar{d}_{i,ji}]^{\mathrm{T}}\) represents the states of encoder and decoder mechanism. The \(\bar{d}_{i,ji}=[d_{i1},\ldots ,d_{i,ji}]^{\mathrm{T}} \in R_{k_{s}}\)

$$\begin{aligned} W_{o}=d_{i},1 \end{aligned}$$
(3)

where \(W_{o}\) denotes the output of system. \(W_{s}=\in \bar{R}(\bar{W}{s-1}=[W_{s},\ldots ,W{s-1}]^{\mathrm{T}})\) denotes system input. \(f_{i}(W_{s})\) denotes the hysteresis type of nonlinearity. \(F_{i,ji}({\bar{W}_{s}},ji)\) denotes the smooth function. For the proposed system, the state constraints are along with \(-Q_{i,ji}<d_{i,ji}<\bar{Q}_{i,ji}\) denotes the positive design constraints, where \(i=1,\ldots ,n, ji=1,\ldots ,s_{i}\). Considering the state constraints in our system results in stability of the system. We assume \(\mu _{i}\), \(\phi _{i}\), \(\psi _{i}=\) design parameters where \(\phi _{i}>0\) are slopes of lines and \(\phi _{i}>\psi _{i}\). It will exhibit the change in Eq. (1). Here, the states are modified after the constraints imposition as \(f_{i}(w_{s})=\phi _{i}(W_{i}(t))\)+ \(\rho _{i}(W_{s_i})\)

$$\begin{aligned} d_{i,iz}=f_{i}(w_{s})=\phi _{i}(W_{i}(t))+ \rho _{i}(W_{s_i})+F_{i,z}(W_s,\bar{W}_{s}-1) \end{aligned}$$
(4)

where \(\rho _{i}(W{s_{i}})= bounded and satisfied\). All other parameters of system will remain same, and proposed system satisfies the state constraints for adaptive neural network used for translating a sentence from source to target language. The developed system exhibits BLEU, i.e. an automatic measure for translation accuracy as 61.02% on combining Keras model with bidirectional layer using gated recurrent units along with Relu and sigmoid activation function and then performing auto-tuning. Adam optimizer is also used to optimize the neural model.

3.4 SHH-MTS: hybrid approach

The hybrid approach uses extraction of linguistic feature and RNN to translate Sanskrit language to Hindi language. In this translation model, the source language is translated to the target language having a lexical gap. It is the process which is deep analysis of the source language and then its lexical transfer to the target language. Accuracy of hybrid approach is more than either only rule-based approach or only phrase-based approach. The SHH-MTS merges the best of both the approaches as it merges linguistic rich features with prominent deep learning approach to provide Sanskrit to Hindi translation. The flow of this system is depicted in Fig. 5.

3.5 Deploying SHH-MTS on cloud

MTS is composed of multiple heterogeneous modules having dependencies according to the task performed. Resolving these complexities is not easy, and it is also a time-consuming task. The increasing demand in the request for MTS hinders the performance of the systems. It leads to slow response and requires more resources to provide more computation. This will increase the computational cost for most of the enterprises and academic institutions. Innovations are necessary to ride the inevitable tide of change. Recurrent changes in terms of either corpus, domain inclusion, the algorithm of modules, modifying rules or a combination of these to improve the accuracy, quality and performance of MT systems. Most of the developments are striving to reduce their computing cost through the means of virtualization. This demand of reducing the computing cost has led to the innovation of cloud computing (Qian et al. 2009). It offers better computing through improved utilization, reduced administration and infrastructure costs. It is a term used to describe both a platform and type of application. As a platform, it supplies, configures and reconfigures servers, while the servers can be physical machines or virtual machines. On the other hand, as applications that can be extended to be accessible through the internet and for this purpose large data centres and powerful servers are used to host the web applications and web services. Our proposed MTS is a web application hosted on cloud to provide SHH-MTS as a service.

figure a
figure b
figure c
figure d
figure e

The features of MTS deployed on the cloud are listed point-to-point below.

  • It provides scalability at the same cost.

  • Reduces load by the distribution of the task to different servers.

  • Fast processing speed due to virtual machines

  • Handling of frequent updates in the algorithm, rules, corpus, dictionary and domain inclusion.

  • Enhancement, adaptability and scalability are easier to perform.

  • Easy to use by the common user as no pre-requisite or knowledge of NLP is required.

These features are adopted by several researchers to develop MTS and by using MTS-as-a-service higher performance has been achieved. Nowadays different cloud service providers are assisting the industries as well as for personal use. Amazon Web Services (AWS) (Amazon 2020) is one of the cloud service providers, which is a secure cloud services platform offering compute power, database storage, content delivery and other functionality to help system scale-up and grow. Therefore, according to the need, the model can be accessed and utilized.

Virtualization (Xing and Zhan 2012) is a viable option, by making an application function as a repository. The key benefits of developing virtual appliance are fine granularity with reducing time for adding and removing computational resources. It would also increase the mobility of application and reduce deployment time. The deployment of virtualization can be performed on the cloud as well as stand-alone. A SHH-MTS is deployed on the cloud architecture as in Fig. 6. The proposed architecture is divided into three layers, i.e. interface layer, service layer and database layer. The interface layer is used for user interaction. In the proposed architecture, the interface is built in the form of a website for SHH-MTS, delivering Sanskrit–Hindi translation as a service to the users.

All the users requesting for Sanskrit–Hindi translation can access the system through the interface of the website which is deployed at the service layer. At the back end of the translation system, the output is generated by various linguistic tools and encoder–decoder architecture of RNN. All these user requests are stored in the cloud storage repository and passed further for processing into the SHH-MTS. Even load balancing and auto-scaling are performed on this layer to handle the traffic demands. It also manages to address advance routing needs by dynamically scaling the web application to changing traffic on demand. It can create capacity groups of servers that work accordingly to the demands. The AWS Elastic Compute Cloud (EC2) allows users to use virtual machines of different configurations as per requirements. It provides a more secure model for every host. The database layer is comprised of the parallel corpus, monolingual corpus and dictionaries. It is used for the physical interface between the application and the database. Simple storage service (S3) is used to allow users to store and retrieve various types of data API calls. With provisioning of additional hardware resources, it is possible to keep the response time within optimum limits as the load increases but this increases cost.

So, the objective of this proposed work is to deploy MTS, on the cloud with provisioning of larger computation resources. It will help to increase the scalability of the system and to improve response time. Cloud deployment requires optimum resource utilization which is possible only when an application can scale-up and scale-down rapidly. This is easily feasible for our proposed SHH-MTS to scale-up or scale-down in real-time. In this work, a hybrid MTS model is deployed on cloud of Amazon (EC2) as depicted in Fig. 7 having better accuracy, CPU utilization and minimum response time. It also eases the deployment and scope of extension or manageability due to which the performance of our proposed system is better than our stand-alone version of systems.

4 Experimental details

The experiment has been conducted on developed SHH-MTS to measure various QoS parameters. The technical specifications along with its versions are displayed in Table 4. For the deployment of SHH-MTS on cloud infrastructure, Amazon Elastic Computer Cloud (EC2) is used. It stimulates scalable deployment of MTS by providing a web service. It provides secure, resizable compute capacity through which we have booted an Amazon Machine Image (AMI) 3.0 for deep learning to configure a virtual machine (VM), also called an instance. The developed system includes (dictionaries, parallel corpus, monolingual corpus, program codes, algorithms, lexical resources, rule database, machine-learned data and its models) is packed as AMI. The experiment conducted was based on Linux Kernel version 3.4.34 Operating system through which user program interacts with the kernel. Virtualization was first performed with Xen and later with Compute Optimized C5 instance, which was based on custom architecture around kernel-based virtual machine (KVM) hypervisor. The processor was ported with IA-64. Elastic Block Store (EBS) volume as a rooted device was used for storage with G3.4*large type. It provides raw block devices that can be attached to the Amazon EC2 instance. It also supports cloning and snapshot, so we have cloned the system image to other virtual machines. It is built on replicating storage when the failure of one component would not cause data loss. EBS volumes can be attached or detached from instance or VM, while they are running and moved from one VM to another VM. A simple storage (S3) is also used which we access (read and write) through the API. The experiment was based on 16 core processor and 122 GB RAM. Rule-based auto-scaling was used which adapts according to the CPU utilization threshold though it takes several seconds to scale up and scale down. The VM start-up time is not dependent on VM type, AMI size, data centre location, etc. Still it took a few seconds to configure.

Each virtual machine has a GPU with 122 GB of RAM and 16-core processor to achieve a high throughput speed approximately 2500 words per second. This speed is not possible for normal systems because in this one epoch will take approximately 2 h to run. We have allocated 5 nodes for this experiment. On each node, SHH-MTS is pre-installed with the help of AMI of 1GB size. It takes 60 s to boot. For each instance created, we have 12 elastic computing unit and 4 virtual CPUs and a memory of 61 GB for a single instance (EBS storage only) with high network performance. After all the environment set-up, the system is ready to run and perform performance testing. The system first runs rule-based linguistic tools, which gives its output to CSV file. This file is processed on TensorFlow with Keras with python 3. It has been evaluated on parameters such as average response time, cost optimization, throughput, server load, total time taken concerning rule matching probability. The number of computational resources (Storage, O.S, Instance type), data, virtual machines were varied across to evaluate the performance of the MTS. The interface designed and hosted on the cloud is shown in Fig. 8.

Fig. 6
figure 6

Architecture for proposed system

Table 4 Technical specifications along with versions
Fig. 7
figure 7

AWS infrastructure used for deploying SHH-MTS as a service

Fig. 8
figure 8

SHH-MTS as a service

5 Result analysis

The performance analysis of this proposed work was conducted by performing a diverse statistical test. The entire section is been classified into two subsections. The first section consists of a comparative analysis of our proposed SHH-MTS as a service with the existing works, while the later subsection focuses on illustrating the performance of MTS based on different approaches rule-based, neural-based and hybrid. As the proposed system was built in iterations, i.e. first rule-based approach was applied. Later neural-based and at last, the output of rule-based was feed as features to neural-based forming it as a hybrid approach. The different statistical tests were conducted for evaluating the performance such as average response time to rule-matching probability, auto-tuning process, cost optimization, throughput, performance, server load and total time is taken to the number of virtual machines. For each of the statistical test conducted, results were achieved by implementing multiple runs which manifested multiple units of values at different time instances.

5.1 Comparative analysis of our proposed work with earlier research work

Throughput is directly proportional to the number of processes completed, and it is also used to analyse the performance of the translation system. It is calculated based on resources used and time consumed.

  • Throughput on stand-alone MTS: Its calculation is done by executing a whole book of sentences using 16 core processor, 122 GB RAM, EBS only instances and G3.4x large type. The same job is divided into several tasks to execute on different computing resources. Table 5 highlights the results of the stand-alone system of earlier proposed work (Ahmad et al. 2011a) on Hindi to Punjabi Cloud-based Sampark MTS tested on dual-core CPU and 1 GB of RAM and our proposed SHH-MTS as a service.

  • Throughput on virtual machine: at first we allocated 2 virtual machine which took 5440 s for processing, later we experimented with 4 virtual machine which took 2113 s, this time for processing reduced rapidly on using more number of virtual machine as it took 790 s for 8 virtual machines and 320 s for 12 virtual machines. Comparing with CBSMTS, it took 970 s on 12 virtual machines as depicted in Table 6.

  • Computing nodes reducing the time for computation: As depicted in Figs. 9 and 10, we performed the test for different sentence lengths, i.e. 20, 50, 100, 150, 200 and 250 and for varying computing nodes 2, 3, 4, 5, 6 and 7. The results can be seen that on increasing the nodes the time is decreasing.

  • Response time: The response time is the time required for output sentence after providing the input sentence to MTS. It can be seen from the results in Fig. 11 the time taken for our proposed CBSHH-MTS and previous research work for different sentence lengths, i.e. 20, 50, 100, 150, 200, 250.

Table 5 Throughput results on stand-alone
Table 6 Throughput calculation on virtual machines
Fig. 9
figure 9

Deployment and usage of cloud infrastructure for (Kumar et al. 2013a)

Fig. 10
figure 10

Deployment and usage of cloud infrastructure for SHH-MTS as a service

Fig. 11
figure 11

Comparison of SHH-MTS as a service with the existing work based on the time consumed for different sentence lengths

5.2 Performance analysis on deployment of rule-based MT, neural MT and hybrid MT on cloud

The elaborate description of rule based used in the development of our proposed system is given in Sect. 3.1, neural based in Sect. 3.2 and hybrid in Sect. 3.3. These have been deployed on cloud individually, and their performance is analysed based on various parameters. The average response time which would depend on the matching of rules from the rule database is depicted in Fig. 12, while the average response time on the number of match action rules is depicted in Fig. 13. The CPU utilization on cloud-based on the packet arrival rate is shown in Fig. 14. Though the AWS provides pay as you use service, the cost according to resources required is displayed in Fig. 15. The throughput which is directly proportional to the number of processes completed and calculated based on resources used and time consumed in Fig. 16. The throughput will increase by increasing the number of virtual machines as in Fig. 17. The server load will decrease in hybrid approach as in Fig. 18 as compared to rule based and neural based. The auto-tuning process (addition of hidden layers automatically) which reduced significantly for both systems after the deployment of the proposed system on the cloud. The graphs depict SHH-MTS, i.e. hybrid performs better than rule-based approach and neural-based approach.

Fig. 12
figure 12

Average response time pertaining to rule matching probability, a hybrid MTS, b neural-based MTS and c rule-based MTS

Fig. 13
figure 13

Average response time pertaining to number of matching action rules, a hybrid MTS, b neural-based MTS and c rule-based MTS

Fig. 14
figure 14

CPU utilization pertaining to packet arrival rate, a hybrid MTS, b neural-based MTS and c rule-based MTS

Fig. 15
figure 15

Cost pertaining to resources, a hybrid MTS, b neural-based MTS and c rule-based MTS

Fig. 16
figure 16

Throughput, a hybrid MTS, b neural-based MTS and c rule-based MTS

6 Open challenges and future research directions

Based on the literature survey, following challenges have been recognized and listed for the future research in this area.

  1. 1.

    QoS enhancement of MTS for the end-users needs to be provided (Dastjerdi et al. 2011). The three dimensions of QoS (job completion time, system throughput, system performance) can be applied to other applications of NLP that exhibits list homomorphism behaviour and applications which can be partitioned for distributed processing like cloud computing (Kumar et al. 2013a).

  2. 2.

    Evaluation of cloud-based models for huge data sets needs to be performed. A comparison of various cloud-based language models based on various parameters is also desirable (Ferrández-Tordera et al. 2016).

  3. 3.

    Developing an MTS as the virtual appliance can handle the most common problem of MTS, i.e. updates by making it function as a repository. The key benefit of developing virtual appliance is the fine granularity with reducing time for adding and removing computational resources. Virtualization also increases the mobility of application and reduces deployment time. The virtualization can be deployed both on the cloud and stand-alone systems (Kumar et al. 2013c).

  4. 4.

    Cloud-based deployment can be performed for various other NLP applications such as text to speech, automatic speech recognition and transliterated system for enhanced performance (Ahmad et al. 2011a).

  5. 5.

    The experiment performed on deploying MT on cloud needs to be performed on public cloud service providers with symmetric computing resources in cloud environment (Ahmad et al. 2011a).

  6. 6.

    There is a need for a special version of the platform for compute-intensive NLP application. As such applications which require more time in computing rather than processing data, cloud platform needs to adopt such applications and develop a special version that can be used by others with an ease (Ahmad et al. 2011a).

  7. 7.

    The scalable model-parallelism library available for training giant neural networks (Huang et al. 2019) needs to decrease the re-computation time, load imbalance, reducing the scaling time for encoder and decoder (Vaswani et al. 2018), parallelism at word level processing (Ahmad et al. 2014) and also minimizes the performance overhead.

Fig. 17
figure 17

Time taken with respect to number of virtual machines

Fig. 18
figure 18

Server load with respect to time

7 Conclusion

SHH-MTS is the integration of linguistically rich approach, i.e. rule-based with prominent result-oriented approach, i.e. neural-based which is gaining significant attention nowadays. It is a complex application with a large number of heterogeneous modules. Deploying such a complex application on a stand-alone machine becomes a difficult and time-consuming task. The existing Sanskrit–Hindi MTS has many drawbacks such as slow speed, less data accuracy and low response time. All these factors adversely affect the performance of the system. It has been observed that local server takes more time to respond and provides lesser accuracy. Therefore, offering MTS as a cloud service is a better proposition for increasing its performance in terms of accuracy and response time. Moreover, auto-tuning for neural-based MT is not possible at the local host due to memory issues, but it is possible on the cloud. Several layers are added automatically to attain maximum accuracy and high speed. The proposed CBSHH-MTS provides better throughput, rule matching probability and number of matching rules in comparison to the stand-alone systems.

8 Future work

In future, massive data can be accessed using the multi-lingual platform, and the cloud can support this environment too. It can also be released as a virtual appliance repository, which can be downloaded easily and used. It will handle the most common problem of MTS, i.e. frequent updates. Also, we would extend our work by using the aforementioned one-to-one nonlinear mapping, the strict-feedback system with full-state constraints which will be converted into a pure-feedback system without state constraints. This will significantly reduce the computational complexity, and stability of the nonlinear system will be enhanced (Sun et al. 2018).