Skip to content

Commit

Permalink
Moving all hindi-urdu modules into a new repository
Browse files Browse the repository at this point in the history
  • Loading branch information
spMohanty committed Feb 8, 2016
0 parents commit c965522
Show file tree
Hide file tree
Showing 65 changed files with 1,283 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# kathaa-hindi-urdu-modules
1 change: 1 addition & 0 deletions agreementfeature/description.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
agreementfeature description
38 changes: 38 additions & 0 deletions agreementfeature/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
module.exports = function (kathaa_inputs, progress, done){
////console.log("Inside agreementfeature");
//save computed output values
var kathaa_outputs = {}

hindi_urdu_request.post({
headers: {'content-type' : 'application/x-www-form-urlencoded;charset=UTF-8'},
url: 'http://api.ilmt.iiit.ac.in/hin/urd/16/16',
body: "input="+encodeURI(kathaa_inputs['in_ssf'])
}, function(error, response, body){
if (!error && response.statusCode == 200) {
try{
////console.log(body);
body = hindi_urdu_entities.decode(body);
body = JSON.parse(body);
//Assumes only one key is passed
for(var _key in body){
kathaa_outputs['out_ssf'] = body[_key];
done && done(null, kathaa_outputs);
return;
}
}catch(e){
var err = new Error('Malformed reply from Sampark API Server');
done(err);
}
}else{
var err = new Error('Sampark API Server non responsive');
done(err);
}
});
//
//
// Available external libraries
//
// GLOBAL.hindi_urdu_request = require('request');
// GLOBAL.hindi_urdu_Entities = require('html-entities').AllHtmlEntities;
// GLOBAL.hindi_urdu_entities = new GLOBAL.hindi_urdu_Entities();
}
21 changes: 21 additions & 0 deletions agreementfeature/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "agreementfeature",
"inports": [
{
"type": "all",
"name": "in_ssf"
}
],
"version": "v0.1",
"outports": [
{
"type": "all",
"name": "out_ssf"
}
],
"metadata": {
"label": "agreementfeature"
},
"icon": "balance-scale",
"main": "index.js"
}
1 change: 1 addition & 0 deletions chunker/description.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
chunker description
38 changes: 38 additions & 0 deletions chunker/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
module.exports = function (kathaa_inputs, progress, done){
////console.log("Inside chunker");
//save computed output values
var kathaa_outputs = {}

hindi_urdu_request.post({
headers: {'content-type' : 'application/x-www-form-urlencoded;charset=UTF-8'},
url: 'http://api.ilmt.iiit.ac.in/hin/urd/7/7',
body: "pickonemorph="+encodeURI(kathaa_inputs['in_ssf'])
}, function(error, response, body){
if (!error && response.statusCode == 200) {
try{
////console.log(body);
body = hindi_urdu_entities.decode(body);
body = JSON.parse(body);
//Assumes only one key is passed
for(var _key in body){
kathaa_outputs['out_ssf'] = body[_key];
done && done(null, kathaa_outputs);
return;
}
}catch(e){
var err = new Error('Malformed reply from Sampark API Server');
done(err);
}
}else{
var err = new Error('Sampark API Server non responsive');
done(err);
}
});
//
//
// Available external libraries
//
// GLOBAL.hindi_urdu_request = require('request');
// GLOBAL.hindi_urdu_Entities = require('html-entities').AllHtmlEntities;
// GLOBAL.hindi_urdu_entities = new GLOBAL.hindi_urdu_Entities();
}
21 changes: 21 additions & 0 deletions chunker/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "chunker",
"inports": [
{
"type": "all",
"name": "in_ssf"
}
],
"version": "v0.1",
"outports": [
{
"type": "all",
"name": "out_ssf"
}
],
"metadata": {
"label": "chunker"
},
"icon": "balance-scale",
"main": "index.js"
}
1 change: 1 addition & 0 deletions defaultfeatures/description.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
defaultfeatures description
38 changes: 38 additions & 0 deletions defaultfeatures/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
module.exports = function (kathaa_inputs, progress, done){
////console.log("Inside defaultfeatures");
//save computed output values
var kathaa_outputs = {}

hindi_urdu_request.post({
headers: {'content-type' : 'application/x-www-form-urlencoded;charset=UTF-8'},
url: 'http://api.ilmt.iiit.ac.in/hin/urd/19/19',
body: "input="+encodeURI(kathaa_inputs['in_ssf'])
}, function(error, response, body){
if (!error && response.statusCode == 200) {
try{
////console.log(body);
body = hindi_urdu_entities.decode(body);
body = JSON.parse(body);
//Assumes only one key is passed
for(var _key in body){
kathaa_outputs['out_ssf'] = body[_key];
done && done(null, kathaa_outputs);
return;
}
}catch(e){
var err = new Error('Malformed reply from Sampark API Server');
done(err);
}
}else{
var err = new Error('Sampark API Server non responsive');
done(err);
}
});
//
//
// Available external libraries
//
// GLOBAL.hindi_urdu_request = require('request');
// GLOBAL.hindi_urdu_Entities = require('html-entities').AllHtmlEntities;
// GLOBAL.hindi_urdu_entities = new GLOBAL.hindi_urdu_Entities();
}
21 changes: 21 additions & 0 deletions defaultfeatures/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "defaultfeatures",
"inports": [
{
"type": "all",
"name": "in_ssf"
}
],
"version": "v0.1",
"outports": [
{
"type": "all",
"name": "out_ssf"
}
],
"metadata": {
"label": "defaultfeatures"
},
"icon": "balance-scale",
"main": "index.js"
}
1 change: 1 addition & 0 deletions headcomputation/description.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
headcomputation description
38 changes: 38 additions & 0 deletions headcomputation/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
module.exports = function (kathaa_inputs, progress, done){
////console.log("Inside headcomputation");
//save computed output values
var kathaa_outputs = {}

hindi_urdu_request.post({
headers: {'content-type' : 'application/x-www-form-urlencoded;charset=UTF-8'},
url: 'http://api.ilmt.iiit.ac.in/hin/urd/11/11',
body: "input="+encodeURI(kathaa_inputs['in_ssf'])
}, function(error, response, body){
if (!error && response.statusCode == 200) {
try{
////console.log(body);
body = hindi_urdu_entities.decode(body);
body = JSON.parse(body);
//Assumes only one key is passed
for(var _key in body){
kathaa_outputs['out_ssf'] = body[_key];
done && done(null, kathaa_outputs);
return;
}
}catch(e){
var err = new Error('Malformed reply from Sampark API Server');
done(err);
}
}else{
var err = new Error('Sampark API Server non responsive');
done(err);
}
});
//
//
// Available external libraries
//
// GLOBAL.hindi_urdu_request = require('request');
// GLOBAL.hindi_urdu_Entities = require('html-entities').AllHtmlEntities;
// GLOBAL.hindi_urdu_entities = new GLOBAL.hindi_urdu_Entities();
}
21 changes: 21 additions & 0 deletions headcomputation/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "headcomputation",
"inports": [
{
"type": "all",
"name": "in_ssf"
}
],
"version": "v0.1",
"outports": [
{
"type": "all",
"name": "out_ssf"
}
],
"metadata": {
"label": "headcomputation"
},
"icon": "balance-scale",
"main": "index.js"
}
1 change: 1 addition & 0 deletions interchunk/description.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
interchunk description
38 changes: 38 additions & 0 deletions interchunk/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
module.exports = function (kathaa_inputs, progress, done){
////console.log("Inside interchunk");
//save computed output values
var kathaa_outputs = {}

hindi_urdu_request.post({
headers: {'content-type' : 'application/x-www-form-urlencoded;charset=UTF-8'},
url: 'http://api.ilmt.iiit.ac.in/hin/urd/17/17',
body: "input="+encodeURI(kathaa_inputs['in_ssf'])
}, function(error, response, body){
if (!error && response.statusCode == 200) {
try{
////console.log(body);
body = hindi_urdu_entities.decode(body);
body = JSON.parse(body);
//Assumes only one key is passed
for(var _key in body){
kathaa_outputs['out_ssf'] = body[_key];
done && done(null, kathaa_outputs);
return;
}
}catch(e){
var err = new Error('Malformed reply from Sampark API Server');
done(err);
}
}else{
var err = new Error('Sampark API Server non responsive');
done(err);
}
});
//
//
// Available external libraries
//
// GLOBAL.hindi_urdu_request = require('request');
// GLOBAL.hindi_urdu_Entities = require('html-entities').AllHtmlEntities;
// GLOBAL.hindi_urdu_entities = new GLOBAL.hindi_urdu_Entities();
}
21 changes: 21 additions & 0 deletions interchunk/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "interchunk",
"inports": [
{
"type": "all",
"name": "in_ssf"
}
],
"version": "v0.1",
"outports": [
{
"type": "all",
"name": "out_ssf"
}
],
"metadata": {
"label": "interchunk"
},
"icon": "balance-scale",
"main": "index.js"
}
1 change: 1 addition & 0 deletions intrachunk/description.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
intrachunk description
38 changes: 38 additions & 0 deletions intrachunk/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
module.exports = function (kathaa_inputs, progress, done){
////console.log("Inside intrachunk");
//save computed output values
var kathaa_outputs = {}

hindi_urdu_request.post({
headers: {'content-type' : 'application/x-www-form-urlencoded;charset=UTF-8'},
url: 'http://api.ilmt.iiit.ac.in/hin/urd/18/18',
body: "input="+encodeURI(kathaa_inputs['in_ssf'])
}, function(error, response, body){
if (!error && response.statusCode == 200) {
try{
////console.log(body);
body = hindi_urdu_entities.decode(body);
body = JSON.parse(body);
//Assumes only one key is passed
for(var _key in body){
kathaa_outputs['out_ssf'] = body[_key];
done && done(null, kathaa_outputs);
return;
}
}catch(e){
var err = new Error('Malformed reply from Sampark API Server');
done(err);
}
}else{
var err = new Error('Sampark API Server non responsive');
done(err);
}
});
//
//
// Available external libraries
//
// GLOBAL.hindi_urdu_request = require('request');
// GLOBAL.hindi_urdu_Entities = require('html-entities').AllHtmlEntities;
// GLOBAL.hindi_urdu_entities = new GLOBAL.hindi_urdu_Entities();
}
21 changes: 21 additions & 0 deletions intrachunk/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "intrachunk",
"inports": [
{
"type": "all",
"name": "in_ssf"
}
],
"version": "v0.1",
"outports": [
{
"type": "all",
"name": "out_ssf"
}
],
"metadata": {
"label": "intrachunk"
},
"icon": "balance-scale",
"main": "index.js"
}
1 change: 1 addition & 0 deletions lexicaltransfer/description.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lexicaltransfer description
Loading

0 comments on commit c965522

Please sign in to comment.