Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
English language syntactic dependency parser.
important This project is in a very early stage, it's rather an experiment than a real a project. Using it in production may hurt your feelings.
npm i --save en-parse
const parser = require("en-parse");
var tokens = ["The", "problem", "is", "that", "this", "has", "never", "been", "tried", "."];
var tags = ["DT","NN","VBZ","IN","DT","VBZ","RB","VBN","VBD","PUNCT"];
let parsed = parser(["PRP","VBP","TO","VBP"],["i","like","to","parse"]);
NOTE: tokens should be normalized (contractions, abbreviations and such all resolved to it's normal form).
The parsed
variable is now an array like this one:
[
{
"label": "MWE",
"type": "NP",
"master": 1
},
{
"label": "NSUBJ",
"type": "NP",
"master": 2
},
{
"label": "ROOT",
"type": "VP",
"master": -1
},
{
"label": "COMPMARK",
"type": "PP",
"master": 5
},
{
"label": "NSUBJ",
"type": "NP",
"master": 5
},
{
"label": "XCOMP",
"type": "VP",
"master": 2
},
{
"label": "ADVMOD",
"type": "ADV",
"master": 8
},
{
"label": "AUX",
"type": "VBN",
"master": 8
},
{
"label": "ADVCL",
"type": "VP",
"master": 5
},
{
"label": "PUNCT",
"type": "PUNCT",
"master": 2
}
]
Annotation | Name | Example |
---|---|---|
NSUBJ | Nominal Subject | I like you |
DOBJ | Direct Object | I like you |
IOBJ | Indirect Object | she gave me a book |
NSUBJPASS | Nominal Subject (passive) | I have been given a chance |
ATTR | Attribute | This is awesome |
CCOMP | Clausal Complement | The boss ordered to dig the hole |
XCOMP | Open Clausal Complement | The boss told us to dig |
OBL | Oblique Object | Give the toys to the children |
EXPL | Expletive | I have been there |
ADVCL | Adverb Clause Modifier | We were walking as the rain was falling |
ADVMOD | Adverbial modifier | I don't eat genetically modified food. |
DISCOURSE | Discourse | I like that :) |
VPRT | Verbal Particle | I switched the TV off |
AUX | Auxiliary | I am going to buy a new computer |
AUXPASS | Auxiliary (passive) | I have been marked |
COMPMARK | Complement Marker | I will do it if I like it |
ADVMARK | Adverb Marker | I did it after I was convinced |
NOMD | Nominal Modifier | MSNBC news had little effect on the market |
NUMMOD | Numeric Modifier | I ate 2 eggs this morning |
ACL | Clausal Modifier of a Noun | I saw the man you love |
AMOD | Adjectival Modifier | you were good to him |
DET | Determiner | which book you prefer? |
CASE | Case Marking | I went to Rachel |
PUNCT | Punctuation | Guys, keep calm! |
CC | Coordinating Conjunction | Mathew and Alex |
INTERJ | Interjection | Pass me the sugar, please |
DEP | Unrecognized dependency | how what |
The idea of this parser was originally featured as a small experiment in Xav Ulflander's Compendium.
FAQs
English language syntactic dependency parser
The npm package en-parse receives a total of 32 weekly downloads. As such, en-parse popularity was classified as not popular.
We found that en-parse demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.