hunspell to handle common english verbs contractions for -ing - spell-checking

Hunspell does not handle by defaults common English Verb contractions of -ing like goin, givin, doin, etc. These verb contractions it seems not to be handled. Let's take an example
I'm going to surfin' and livin' on my own and maybe givin' up
This will be the hunspell correct, suggestions, analysis (morphological) for this sentence:
[
{
"word": "I",
"stems": [],
"suggestion": [],
"correct": true
},
{
"word": "m",
"stems": [],
"suggestion": [],
"correct": true
},
{
"word": "goin",
"stems": [],
"suggestion": [
"goon",
"gin",
"groin",
"going",
"gain",
"grin",
"loin",
"coin",
"gown",
"go in",
"go-in"
],
"correct": false,
"analysis": []
},
{
"word": "to",
"stems": [],
"suggestion": [],
"correct": true
},
{
"word": "surfin",
"stems": [],
"suggestion": [
"surfing",
"surf in",
"surf-in",
"superfine"
],
"correct": false,
"analysis": []
},
{
"word": "and",
"stems": [],
"suggestion": [],
"correct": true
},
{
"word": "livin",
"stems": [],
"suggestion": [
"living",
"liven",
"livid",
"violin",
"Lin"
],
"correct": false,
"analysis": []
},
{
"word": "on",
"stems": [],
"suggestion": [],
"correct": true
},
{
"word": "my",
"stems": [],
"suggestion": [],
"correct": true
},
{
"word": "own",
"stems": [],
"suggestion": [],
"correct": true
},
{
"word": "and",
"stems": [],
"suggestion": [],
"correct": true
},
{
"word": "maybe",
"stems": [
"maybe"
],
"suggestion": [],
"correct": true,
"analysis": [
" st: maybe"
]
},
{
"word": "givin",
"stems": [],
"suggestion": [
"giving",
"given",
"virgin",
"gin"
],
"correct": false,
"analysis": []
},
{
"word": "up",
"stems": [],
"suggestion": [],
"correct": true
}
]
so for contractions like givin the correct flag is false and there are some suggestions, among them the -ing form giving. For some reason, the morphological analysis is not present.
So how to add support for English verb forms of verbs followed by -ing in order to be considered as correct terms?
Shall be added some rules fo the affix dictionary for English?

Related

Create Delivery Plan styling rules using Azure Devops REST Apis

I am trying to create Delivery plan in the Azure Devops project using Azure Devops REST Apis. I have used following method to create the same.
https://learn.microsoft.com/en-us/rest/api/azure/devops/work/plans/create?view=azure-devops-rest-6.0
POST https://dev.azure.com/{organization}/{project}/_apis/work/plans?api-version=6.0
and I am sending following data in the request body properties
{
"properties": {
"teamBacklogMappings": [
{
"teamId": "09d57738-697f-4433-abdd-b80a2bc6337b",
"categoryReferenceName": "Microsoft.RequirementCategory"
},
{
"teamId": "5df45eec-4108-474a-8d93-bc09c0b9037e",
"categoryReferenceName": "Microsoft.RequirementCategory"
},
{
"teamId": "e8ed402b-68e7-4140-96f2-07790a08788b",
"categoryReferenceName": "Microsoft.RequirementCategory"
},
{
"teamId": "14425694-efa5-454e-811c-e9e03d79198f",
"categoryReferenceName": "Microsoft.RequirementCategory"
},
{
"teamId": "b02690e9-1f48-421a-a918-3b23cc9a1b73",
"categoryReferenceName": "Microsoft.RequirementCategory"
}
],
"cardSettings": {
"fields": {
"showId": true,
"showAssignedTo": true,
"assignedToDisplayFormat": "avatarOnly",
"showState": true,
"showTags": true,
"showParent": false,
"showEmptyFields": true,
"showChildRollup": true,
"additionalFields": null,
"coreFields": [
{
"referenceName": "System.AssignedTo",
"displayName": "Assigned To",
"fieldType": "string",
"isIdentity": true
},
{
"referenceName": "System.Id",
"displayName": "ID",
"fieldType": "integer",
"isIdentity": false
},
{
"referenceName": "System.State",
"displayName": "State",
"fieldType": "string",
"isIdentity": false
},
{
"referenceName": "System.Tags",
"displayName": "Tags",
"fieldType": "plainText",
"isIdentity": false
}
]
}
},
"markers": [],
"styleSettings": [
{
"name": "BLOCKER",
"isEnabled": "True",
"filter": "[System.Tags] CONTAINS 'BLOCKER'",
"clauses": [
{
"fieldName": "System.Tags",
"logicalOperator": "AND",
"operator": "CONTAINS",
"value": "BLOCKER"
}
],
"settings": {
"background-color": "#E60017",
"title-color": "#000000"
}
},
{
"name": "New",
"isEnabled": "True",
"filter": "[System.State] = 'New'",
"clauses": [
{
"fieldName": "System.State",
"logicalOperator": "AND",
"operator": "=",
"value": "New"
}
],
"settings": {
"background-color": "#AAAAAA",
"title-color": "#000000"
}
},
{
"name": "Dev Completed",
"isEnabled": "True",
"filter": "[System.State] = 'Development Completed'",
"clauses": [
{
"fieldName": "System.State",
"logicalOperator": "AND",
"operator": "=",
"value": "Development Completed"
}
],
"settings": {
"background-color": "#D7E587",
"title-color": "#000000"
}
},
{
"name": "Deployed to QA",
"isEnabled": "True",
"filter": "[System.State] = 'Deployed to QA (SIT)'",
"clauses": [
{
"fieldName": "System.State",
"logicalOperator": "AND",
"operator": "=",
"value": "Deployed to QA (SIT)"
}
],
"settings": {
"background-color": "#C3D84C",
"title-color": "#000000"
}
},
{
"name": "Deployed to UAT",
"isEnabled": "True",
"filter": "[System.State] = 'Deployed to UAT'",
"clauses": [
{
"fieldName": "System.State",
"logicalOperator": "AND",
"operator": "=",
"value": "Deployed to UAT"
}
],
"settings": {
"background-color": "#60AF49",
"title-color": "#000000"
}
},
{
"name": "Deployed to PROD",
"isEnabled": "True",
"filter": "[System.State] = 'Completed'",
"clauses": [
{
"fieldName": "System.State",
"logicalOperator": "AND",
"operator": "=",
"value": "Completed"
}
],
"settings": {
"background-color": "#00643A",
"title-color": "#000000"
}
}
],
"tagStyleSettings": []
}
}
However Styling rules are not getting created in the project.
Got this done by using Update for the Delivery plan immediately after creating the same. Update it with same properties though you will have to add revision property to the request body.
https://learn.microsoft.com/en-us/rest/api/azure/devops/work/plans/update?view=azure-devops-rest-6.0
https://dev.azure.com/{organization}/{project}/_apis/work/plans/{id}?api-version=6.0
Create Delivery Plan doesn't accept style settings, from the UI you can notice this:
Just get the plan id and the response from the Create API and then use them in the Update API, this is the only way.

Problem of integration krakend with keycloak

I have keycloak bitnami chart and krakend deployed in in k8s. Also I have a test api, and I want being authenticated before access it. I'm able to get valid jwt token from keycloak, but when I'm trying to access my api through krakend, it returns 401 error
Any help is really appreciated.
Software versions:
keycloak: 16.1.1
crakend: 2.0.4
{
"$schema": "https://www.krakend.io/schema/v3.json",
"version": 3,
"timeout": "3000ms",
"cache_ttl": "300s",
"output_encoding": "json",
"port": 8080,
"endpoints": [
{
"endpoint": "/mock/parents/{id}",
"method": "GET",
"input_headers": [
"Authorization"
],
"extra_config": {
"auth/validator": {
"alg": "RS256",
"jwk-url": "http://keycloak-headless:8080/auth/realms/master/protocol/openid-connect/certs",
"disable_jwk_security": true,
"roles_key_is_nested": true,
"roles_key": "realm_access.roles",
"roles": ["test-app-parent"],
"operation_debug": true
}
},
"output_encoding": "json",
"concurrent_calls": 1,
"backend": [
{
"url_pattern": "/parents/{id}",
"encoding": "json",
"sd": "static",
"extra_config": {},
"host": [
"http://testapp-service:8400"
],
"disable_host_sanitize": false,
"blacklist": [
"super_secret_field"
]
},
{
"url_pattern": "/siblings/{id}",
"encoding": "json",
"sd": "static",
"extra_config": {},
"host": [
"http://testapp-service:8400"
],
"blacklist": [
"sibling_id"
],
"group": "extra_info",
"disable_host_sanitize": false
},
{
"url_pattern": "/parents/{id}/children",
"encoding": "json",
"sd": "static",
"extra_config": {},
"host": [
"http://testapp-service:8400"
],
"disable_host_sanitize": false,
"mapping": {
"content": "cars"
},
"whitelist": [
"content"
]
}
]
},
{
"endpoint": "/mock/bogus-new-api/{path}",
"method": "GET",
"extra_config": {
"auth/validator": {
"alg": "RS256",
"jwk-url": "http://keycloak-headless:8080/auth/realms/master/protocol/openid-connect/certs",
"disable_jwk_security": true
},
"github.com/devopsfaith/krakend/proxy": {
"static": {
"data": {
"new_field_a": 123,
"new_field_b": [
"arr1",
"arr2"
],
"new_field_c": {
"obj": "obj1"
}
},
"strategy": "always"
}
}
},
"output_encoding": "json",
"concurrent_calls": 1,
"backend": [
{
"url_pattern": "/not-finished-yet",
"encoding": "json",
"sd": "static",
"extra_config": {},
"host": [
"nothing-here"
],
"disable_host_sanitize": false
}
]
}
]
}
Oh my God this made me go insane.
In one of the last version updates they changed jwk-url to jwk_url.
https://github.com/krakendio/krakend-ce/issues/495#issuecomment-1138397005
After I fixed that it worked for me.
It worked for me after I changed
"jwk_url": "http://KEYCLOAK-SERVICE-NAME:8080/auth/realms/master/protocol/openid-connect/certs" to "jwk_url": "http://host.docker.internal:8080/auth/realms/master/protocol/openid-connect/certs"

Remove Object Using Conditional Filtering - Mule 3

I need to do a conditional filtering using Mule 3. A sample payload is given below:
{
"MainNode": {
"ID": "123",
"MainNodekey1": "1",
"sysDetail": [
{
"sysDetail11": "localhost1",
"sysDetail21": "443",
"country": [
{
"k1": "country",
"value": [
"IN"
]
}
]
},
{
"sysDetail21": "localhost2",
"sysDetail22": "443",
"country": [
{
"k2": "country",
"value": [
"RSA",
"UK",
"SL"
]
}
]
}
],
"sysDetai2": {},
"sysDetai3": {}
},
"MainCode": "AAA",
"MainTyoe": "BBB",
"MyArray": [
{
"ObjId": "100",
"Obj1": {
"SubObj11": {},
"SubObj12": {},
"ObjCountry": "IN",
"ObjId": "A100"
},
"Obj1Source": {}
},
{
"ObjId": "200",
"Obj2": {
"SubObj21": {},
"SubObj22": {},
"ObjCountry": "IN",
"ObjId": "B100"
},
"Obj2Source": {}
}
]
}
The output that I need is to filter the main payload by applying a filter like below:
payload.MainNode.sysDetail.country..value == payload.Obj1.ObjCountry (which will be constant for all array elements)
Expected output is below:
{
"MainNode": {
"ID": "123",
"MainNodekey1": "1",
"sysDetail": [
{
"sysDetail11": "localhost1",
"sysDetail21": "443",
"country": [
{
"k1": "country",
"value": [
"IN"
]
}
]
}
],
"sysDetai2": {},
"sysDetai3": {}
},
"MainCode": "AAA",
"MainTyoe": "BBB",
"MyArray": [
{
"ObjId": "100",
"Obj1": {
"SubObj11": {},
"SubObj12": {},
"ObjCountry": "IN",
"ObjId": "A100"
},
"Obj1Source": {}
},
{
"ObjId": "200",
"Obj2": {
"SubObj21": {},
"SubObj22": {},
"ObjCountry": "IN",
"ObjId": "B100"
},
"Obj2Source": {}
}
]
}

RabbitMQ configuration script

I've a rabbit configuration file and it contains a JSON. As far as I know by using that I can configure the RabbitMQ but I couldn't figure out where I have to put that file or how to run it.
{
"rabbit_version": "3.5.6",
"users": [{
"name": "guest",
"password_hash": "GAd/n+dflOQhAEnqkF6y2V0TMrU=",
"tags": "administrator"
}
],
"vhosts": [{
"name": "/"
}
],
"permissions": [{
"user": "guest",
"vhost": "/",
"configure": ".*",
"write": ".*",
"read": ".*"
}
],
"parameters": [],
"policies": [],
"queues": [{
"name": "stream.service.postpaid",
"vhost": "/",
"durable": true,
"auto_delete": false,
"arguments": {}
}, {
"name": "stream.smart.dl.postpaid",
"vhost": "/",
"durable": true,
"auto_delete": false,
"arguments": {}
}, {
"name": "stream.smart.postpaid",
"vhost": "/",
"durable": true,
"auto_delete": false,
"arguments": {
"x-max-length": 100000,
"x-dead-letter-exchange": "decoder.dl.sn",
"x-message-ttl": 60000
}
}
],
"exchanges": [{
"name": "decoder.sn",
"vhost": "/",
"type": "topic",
"durable": true,
"auto_delete": false,
"internal": false,
"arguments": {}
}, {
"name": "decoder.dl.sn",
"vhost": "/",
"type": "topic",
"durable": true,
"auto_delete": false,
"internal": false,
"arguments": {}
}
],
"bindings": [{
"source": "decoder.dl.sn",
"vhost": "/",
"destination": "stream.smart.dl.postpaid",
"destination_type": "queue",
"routing_key": "SMART.POSTPAID",
"arguments": {}
}, {
"source": "decoder.sn",
"vhost": "/",
"destination": "stream.service.postpaid",
"destination_type": "queue",
"routing_key": "SERVICE.POSTPAID",
"arguments": {}
}, {
"source": "decoder.sn",
"vhost": "/",
"destination": "stream.smart.postpaid",
"destination_type": "queue",
"routing_key": "SMART.POSTPAID",
"arguments": {}
}
]
}
Just find it out.
we can use web interface to import file or following command by using shell
rabbitmqadmin -q import rabbit.config

How can I get the final status of a completed Jenkins job via API?

I make a call like:
http://jenkins.mysite.com/job/MYJOB/api/json?depth=2&tree=builds%5Bactions%5Bparameters%5Bname%2Cvalue%5D%5D%2Cnumber%2Cresult%5D
and get a result like:
{
"builds": [{
"actions": [{
"parameters": [{
"name": "JT_BUILD_ID",
"value": "1274"
}]
}, {}, {}, {}, {}],
"number": 3,
"result": "SUCCESS"
}, {
"actions": [{
"parameters": [{
"name": "JT_BUILD_ID",
"value": "1273"
}]
}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}],
"number": 2,
"result": "SUCCESS"
}, {
"actions": [{
"parameters": [{
"name": "JT_BUILD_ID",
"value": "0"
}]
}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}],
"number": 1,
"result": "SUCCESS"
}]
}
I am passing JT_BUILD_ID so I can match to this run of MYJOB.
When I find the matching JT_BUILD_ID, I look at result and when I see SUCCESS I assume I am done. But the job is still running do to post build actions.
How can I both match the instance of the build (using the parameter JT_BUILD_ID) and detect the final status of the job?
There is another key building under builds, if the post-build is still working, the status will be kept as true. It turns to false when the job is totally completed.
Therefore you can add extra check for building == false, the final url looks like below
https://ci.jenkins-ci.org/view/Libraries/job/lib-jira-api/api/json/?pretty=true&depth=2&tree=builds[actions[parameters[name,value]],number,result,building]
The result could be like below in your case if latest build is ongoing (in post-build phase)
{
"builds": [{
"actions": [{
"parameters": [{
"name": "JT_BUILD_ID",
"value": "1274"
}]
}, {}, {}, {}, {}],
"building" : true,
"number": 3,
"result": "SUCCESS"
}, {
"actions": [{
"parameters": [{
"name": "JT_BUILD_ID",
"value": "0"
}]
}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}],
"building" : false,
"number": 1,
"result": "SUCCESS"
}]
}