Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
de.spinscale.elasticsearch.plugin:ingest-langdetect
Advanced tools
Ingest processor doing language detection for fields
Uses the langdetect plugin to try to find out the language used in a field.
ES | Command |
---|---|
5.1.2 | bin/elasticsearch-plugin install https://oss.sonatype.org/content/repositories/releases/de/spinscale/elasticsearch/plugin/ingest-langdetect/5.1.2.1/ingest-langdetect-5.1.2.1.zip |
5.1.1 | bin/elasticsearch-plugin install https://oss.sonatype.org/content/repositories/releases/de/spinscale/elasticsearch/plugin/ingest-langdetect/5.1.1.1/ingest-langdetect-5.1.1.1.zip |
PUT _ingest/pipeline/langdetect-pipeline
{
"description": "A pipeline to do whatever",
"processors": [
{
"langdetect" : {
"field" : "my_field",
"target_field" : "language"
}
}
]
}
PUT /my-index/my-type/1?pipeline=langdetect-pipeline
{
"my_field" : "This is hopefully an english text, that will be detected."
}
GET /my-index/my-type/1
# Expected response
{
"my_field" : "This is hopefully an english text, that will be detected.",
"language": "en"
}
Parameter | Use |
---|---|
field | Field name of where to read the content from |
target_field | Field name to write the language to |
max_length | Max length of of characters to read, defaults to 10kb, requires a byte size value, like 1mb |
In order to install this plugin, you need to create a zip distribution first by running
gradle clean check
This will produce a zip file in build/distributions
.
After building the zip file, you can install it like this
bin/plugin install file:///path/to/ingest-langdetect/build/distribution/ingest-langdetect-0.0.1-SNAPSHOT.zip
In order to cope with the security manager, a special factory is used to load the languages from the classpath.
You can check out the SecureDetectorFactory
class. This implementation also does not use jsonic to prevent the use of reflection when loading the languages.
FAQs
Unknown package
We found that de.spinscale.elasticsearch.plugin:ingest-langdetect demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.