Search is not available for this dataset
query
stringlengths
7
355k
document
stringlengths
9
341k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
`_saveContext` stores the current parsing context when entering a new scope (list, blank node, formula)
_saveContext(type, graph, subject, predicate, object) { var n3Mode = this._n3Mode; this._contextStack.push({ subject: subject, predicate: predicate, object: object, graph: graph, type: type, inverse: n3Mode ? this._inversePredicate : false, blankPrefix: n3Mode ? this._...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function saveContext() {\n context.save();\n }", "_saveContext(type, graph, subject, predicate, object) {\n const n3Mode = this._n3Mode;\n this._contextStack.push({\n type,\n subject,\n predicate,\n object,\n graph,\n inverse: n3Mode ? this._inversePredicate : false,...
[ "0.57599986", "0.57488936", "0.5686835", "0.5519483", "0.55147797", "0.53371567", "0.53131694", "0.53131694", "0.53131694", "0.53131694", "0.53131694", "0.53131694", "0.53131694", "0.5268881", "0.523577", "0.5064016", "0.5061033", "0.50549734", "0.5039843", "0.4982786", "0.49...
0.5788798
0
`_restoreContext` restores the parent context when leaving a scope (list, blank node, formula)
_restoreContext() { var context = this._contextStack.pop(), n3Mode = this._n3Mode; this._subject = context.subject; this._predicate = context.predicate; this._object = context.object; this._graph = context.graph; // The settings below only apply to N3 streams if (n3Mode) { this._...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function restoreContext() {\n context.restore();\n }", "restoreContext() {\n this.context.restore();\n }", "restore(): void {\n this.context.restore();\n }", "function RestoreContext()\n\t\t{\n\t\t\tExtension.restoreContext();\n\t\t}", "restore() {\n this.ctx.restore();\n }", "_rest...
[ "0.78305674", "0.7700339", "0.7276325", "0.7178735", "0.69868094", "0.6567017", "0.6370114", "0.6361231", "0.61290264", "0.61138827", "0.6016624", "0.5987528", "0.5928139", "0.5918174", "0.5912279", "0.5897978", "0.5896541", "0.5878238", "0.5877279", "0.5877279", "0.58708096"...
0.6044744
10
`_readInTopContext` reads a token when in the top context
_readInTopContext(token) { switch (token.type) { // If an EOF token arrives in the top context, signal that we're done case 'eof': if (this._graph !== null) return this._error('Unclosed graph', token); delete this._prefixes._; return this._callback(null, null, this._prefixes); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_readInTopContext(token) {\n switch (token.type) {\n // If an EOF token arrives in the top context, signal that we're done\n case 'eof':\n if (this._graph !== null) return this._error('Unclosed graph', token);\n delete this._prefixes._;\n return this._callback(null, null, this._pr...
[ "0.76496357", "0.63245225", "0.59852046", "0.5916154", "0.58343947", "0.5807826", "0.57897395", "0.57897395", "0.57897395", "0.57897395", "0.57897395", "0.5777931", "0.5777931", "0.57208824", "0.57208824", "0.56311", "0.56214815", "0.55951065", "0.5576739", "0.5576739", "0.55...
0.75967276
1
`_readEntity` reads an IRI, prefixed name, blank node, or variable
_readEntity(token, quantifier) { var value; switch (token.type) { // Read a relative or absolute IRI case 'IRI': case 'typeIRI': var iri = this._resolveIRI(token.value); if (iri === null) return this._error('Invalid IRI', token); value = this._namedNode(iri); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_readEntity(token, quantifier) {\n let value;\n switch (token.type) {\n // Read a relative or absolute IRI\n case 'IRI':\n case 'typeIRI':\n const iri = this._resolveIRI(token.value);\n if (iri === null) return this._error('Invalid IRI', token);\n value = this._namedNode(i...
[ "0.74516445", "0.68737006", "0.56869066", "0.55567867", "0.543989", "0.54333776", "0.53868306", "0.53322625", "0.53272516", "0.5294516", "0.5289073", "0.5203355", "0.5153668", "0.5143889", "0.5126336", "0.503115", "0.49865752", "0.49567443", "0.49226645", "0.4884502", "0.4884...
0.73739713
1
`_readSubject` reads a quad's subject
_readSubject(token) { this._predicate = null; switch (token.type) { case '[': // Start a new quad with a new blank node as subject this._saveContext('blank', this._graph, this._subject = this._blank(), null, null); return this._readBlankNodeHead; case '(': // Start...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_readSubject(token) {\n this._predicate = null;\n switch (token.type) {\n case '[':\n // Start a new quad with a new blank node as subject\n this._saveContext('blank', this._graph, this._subject = this._blankNode(), null, null);\n return this._readBlankNodeHead;\n case '(':\n ...
[ "0.7032028", "0.60240555", "0.5815878", "0.5776068", "0.55791146", "0.5532548", "0.5493668", "0.5418498", "0.5404069", "0.5404069", "0.5404069", "0.5404069", "0.5404069", "0.5393273", "0.53904176", "0.5358502", "0.5308757", "0.53082407", "0.5268638", "0.5268638", "0.5268638",...
0.69122154
1
`_readPredicate` reads a quad's predicate
_readPredicate(token) { var type = token.type; switch (type) { case 'inverse': this._inversePredicate = true; case 'abbreviation': this._predicate = this.ABBREVIATIONS[token.value]; break; case '.': case ']': case '}': // Expected predicate didn't...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_readPredicate(token) {\n const type = token.type;\n switch (type) {\n case 'inverse':\n this._inversePredicate = true;\n case 'abbreviation':\n this._predicate = this.ABBREVIATIONS[token.value];\n break;\n case '.':\n case ']':\n case '}':\n // Expected p...
[ "0.6934653", "0.66428024", "0.66428024", "0.620414", "0.620414", "0.5740345", "0.5650567", "0.5650567", "0.5650567", "0.55331147", "0.553022", "0.553022", "0.5506853", "0.54997784", "0.54997784", "0.5406356", "0.5405354", "0.527327", "0.5155781", "0.5155781", "0.5108937", "...
0.6554513
3
`_readObject` reads a quad's object
_readObject(token) { switch (token.type) { case 'literal': // Regular literal, can still get a datatype or language if (token.prefix.length === 0) { this._literalValue = token.value; return this._readDataTypeOrLang; } // Pre-datatyped string literal (prefix stores t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function OBJReader () {}", "readSelectedFile() {\n var fileReader = new FileReader();\n var objFile = document.getElementById(\"fileInput\").files[0];\n\n if (!objFile) {\n alert(\"OBJ file not set!\");\n return;\n }\n\n fileReader.readAsText(objFile);\n ...
[ "0.6498975", "0.6021726", "0.59550905", "0.58764005", "0.5833571", "0.5725038", "0.5725038", "0.57156634", "0.57077354", "0.56002784", "0.55657756", "0.5514655", "0.54954606", "0.54954606", "0.54795545", "0.54785836", "0.54449934", "0.54342663", "0.54326415", "0.5391564", "0....
0.6064926
1
`_readPredicateOrNamedGraph` reads a quad's predicate, or a named graph
_readPredicateOrNamedGraph(token) { return token.type === '{' ? this._readGraph(token) : this._readPredicate(token); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_readPredicate(token) {\n const type = token.type;\n switch (type) {\n case 'inverse':\n this._inversePredicate = true;\n case 'abbreviation':\n this._predicate = this.ABBREVIATIONS[token.value];\n break;\n case '.':\n case ']':\n case '}':\n // Expected p...
[ "0.56805634", "0.54001886", "0.5381928", "0.5266954", "0.4917405", "0.4917405", "0.48296836", "0.47328237", "0.46479532", "0.46038908", "0.46038908", "0.45782056", "0.45782056", "0.4567631", "0.4552377", "0.45422462", "0.45353547", "0.45139882", "0.44725522", "0.44725522", "0...
0.64819306
1
`_readGraph` reads a graph
_readGraph(token) { if (token.type !== '{') return this._error('Expected graph but got ' + token.type, token); // The "subject" we read is actually the GRAPH's label this._graph = this._subject, this._subject = null; return this._readSubject; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function readGraph(path) {\n let data = fs.readFileSync(path);\n let obj = place.read(new Pbf(data));\n let graph = createGraph();\n\n obj.ways.forEach(way => {\n way.nodes.forEach((node, idx, arr) => {\n if (idx == 0) return;\n let from = arr[idx - 1];\n let to = arr[idx];\n if (graph.h...
[ "0.75073797", "0.70027006", "0.66018975", "0.60658425", "0.58195376", "0.5669168", "0.5640165", "0.56352603", "0.539433", "0.5358274", "0.5353225", "0.53075904", "0.52900964", "0.52534634", "0.52437896", "0.5224544", "0.5214237", "0.51831967", "0.5176521", "0.5141033", "0.512...
0.6972086
2
`_readBlankNodeHead` reads the head of a blank node
_readBlankNodeHead(token) { if (token.type === ']') { this._subject = null; return this._readBlankNodeTail(token); } else { this._predicate = null; return this._readPredicate(token); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_readBlankNodeTail(token) {\n if (token.type !== ']') return this._readBlankNodePunctuation(token);\n\n // Store blank node quad\n if (this._subject !== null) this._emit(this._subject, this._predicate, this._object, this._graph);\n\n // Restore the parent context containing this blank node\n const e...
[ "0.6774688", "0.67301464", "0.64238495", "0.6277445", "0.59285516", "0.589926", "0.57979715", "0.57804555", "0.57056844", "0.55452615", "0.5486357", "0.5444227", "0.5409431", "0.53178424", "0.5293991", "0.5293991", "0.5293991", "0.5293991", "0.5293991", "0.52768326", "0.52684...
0.7443891
1
`_readBlankNodeTail` reads the end of a blank node
_readBlankNodeTail(token) { if (token.type !== ']') return this._readBlankNodePunctuation(token); // Store blank node quad if (this._subject !== null) this._emit(this._subject, this._predicate, this._object, this._graph); // Restore the parent context containing this blank node var empty = this._predicate...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_readBlankNodeTail(token) {\n if (token.type !== ']') return this._readBlankNodePunctuation(token);\n\n // Store blank node quad\n if (this._subject !== null) this._emit(this._subject, this._predicate, this._object, this._graph);\n\n // Restore the parent context containing this blank node\n const e...
[ "0.80194724", "0.68472165", "0.68472165", "0.6240477", "0.56961703", "0.55941546", "0.5465254", "0.53349507", "0.52658397", "0.5188827", "0.5188827", "0.5132087", "0.51293004", "0.5128677", "0.5068747", "0.5027342", "0.49868524", "0.49862728", "0.497645", "0.495071", "0.49273...
0.7982947
1
`_readPredicateAfterBlank` reads a predicate after an anonymous blank node
_readPredicateAfterBlank(token) { switch (token.type) { case '.': case '}': // No predicate is coming if the triple is terminated here this._subject = null; return this._readPunctuation(token); default: return this._readPredicate(token); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_readPredicateAfterBlank(token) {\n switch (token.type) {\n case '.':\n case '}':\n // No predicate is coming if the triple is terminated here\n this._subject = null;\n return this._readPunctuation(token);\n default:\n return this._readPredicate(token);\n }\n }", ...
[ "0.7411438", "0.7254401", "0.69836324", "0.68351454", "0.68351454", "0.5747461", "0.5590654", "0.5531458", "0.5456922", "0.5428409", "0.5414252", "0.509533", "0.501304", "0.48919705", "0.48662993", "0.4770231", "0.46511325", "0.46493858", "0.46493858", "0.46352252", "0.463471...
0.7407335
1
`_readListItem` reads items from a list
_readListItem(token) { var item = null, // The item of the list list = null, // The list itself previousList = this._subject, // The previous list that contains this list stack = this._contextStack, // The stack of parent contexts parent = stack[stack.length - 1], ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getReadList(state, list) {\n\t\t\tstate.readList = list;\n\t\t}", "function readListItemById(listName, itemId) {\n var siteUrl = getSiteUrl();\n var deferred = $q.defer();\n\n $http.get(siteUrl + \"/_api/web/lists/GetByTitle('\" + listName + \"')/items('\" + itemId + \"')\", getG...
[ "0.6927882", "0.6722683", "0.6418096", "0.6248814", "0.59698266", "0.5929535", "0.5929535", "0.5929535", "0.5895238", "0.58857334", "0.5812737", "0.5803781", "0.57885", "0.57535195", "0.5701681", "0.5695927", "0.5687068", "0.5660039", "0.5648314", "0.563582", "0.5623481", "...
0.6419677
2
`_readDataTypeOrLang` reads an _optional_ datatype or language
_readDataTypeOrLang(token) { return this._completeLiteral(token, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_readDataTypeOrLang(token) {\n return this._completeObjectLiteral(token, false);\n }", "_readListItemDataTypeOrLang(token) {\n return this._completeObjectLiteral(token, true);\n }", "_readListItemDataTypeOrLang(token) {\n return this._completeLiteral(token, true);\n }", "getSpeechForDataType(data...
[ "0.64496315", "0.5796014", "0.5685338", "0.54282236", "0.5219183", "0.5078022", "0.50716996", "0.504311", "0.4855352", "0.4801266", "0.47562298", "0.47192806", "0.47059098", "0.4701683", "0.46938565", "0.46938565", "0.46938565", "0.46706727", "0.46626535", "0.46567646", "0.45...
0.6449151
1
`_readListItemDataTypeOrLang` reads an _optional_ datatype or language in a list
_readListItemDataTypeOrLang(token) { return this._completeLiteral(token, true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_readListItemDataTypeOrLang(token) {\n return this._completeObjectLiteral(token, true);\n }", "_readDataTypeOrLang(token) {\n return this._completeObjectLiteral(token, false);\n }", "_readDataTypeOrLang(token) {\n return this._completeLiteral(token, false);\n }", "function listItemType(el) {\n ...
[ "0.7320167", "0.55413955", "0.5527871", "0.50187767", "0.4828631", "0.4588806", "0.45409963", "0.453037", "0.4493829", "0.44246733", "0.44241616", "0.44002602", "0.43595377", "0.43534467", "0.42461947", "0.42422935", "0.42219475", "0.42113915", "0.42058957", "0.41788018", "0....
0.7237046
1
`_completeLiteral` completes a literal with an optional datatype or language
_completeLiteral(token, listItem) { switch (token.type) { // Create a datatyped literal case 'type': case 'typeIRI': var datatype = this._readEntity(token); if (datatype === undefined) return; // No datatype means an error occurred this._object = this._literal(this._liter...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_completeLiteral(token) {\n // Create a simple string literal by default\n let literal = this._literal(this._literalValue);\n switch (token.type) {\n // Create a datatyped literal\n case 'type':\n case 'typeIRI':\n const datatype = this._readEntity(token);\n if (datatype === u...
[ "0.7670886", "0.65974635", "0.65974635", "0.6264819", "0.6230983", "0.61152226", "0.5983827", "0.5977482", "0.5940136", "0.5796307", "0.57755005", "0.57649356", "0.5745858", "0.5741501", "0.5734576", "0.5703686", "0.5673256", "0.56365573", "0.5628856", "0.5623365", "0.5589129...
0.69456387
1
`_readFormulaTail` reads the end of a formula
_readFormulaTail(token) { if (token.type !== '}') return this._readPunctuation(token); // Store the last quad of the formula if (this._subject !== null) this._emit(this._subject, this._predicate, this._object, this._graph); // Restore the parent context containing this formula this._restoreContext(); // I...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_readFormulaTail(token) {\n if (token.type !== '}') return this._readPunctuation(token);\n\n // Store the last quad of the formula\n if (this._subject !== null) this._emit(this._subject, this._predicate, this._object, this._graph);\n\n // Restore the parent context containing this formula\n this._re...
[ "0.78564674", "0.5347125", "0.5296108", "0.5119418", "0.5118655", "0.510285", "0.5091416", "0.49957755", "0.49957755", "0.49957755", "0.49957755", "0.49835032", "0.47833943", "0.47824115", "0.47195798", "0.47081164", "0.46727368", "0.4638012", "0.46352246", "0.46325678", "0.4...
0.7840027
1
`_readPunctuation` reads punctuation between quads or quad parts
_readPunctuation(token) { var next, subject = this._subject, graph = this._graph, inversePredicate = this._inversePredicate; switch (token.type) { // A closing brace ends a graph case '}': if (this._graph === null) return this._error('Unexpected graph closing', token...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_readQuadPunctuation(token) {\n if (token.type !== '.') return this._error('Expected dot to follow quad', token);\n return this._readInTopContext;\n }", "_readQuadPunctuation(token) {\n if (token.type !== '.') return this._error('Expected dot to follow quad', token);\n return this._readInTopContext;...
[ "0.7395283", "0.7395283", "0.7307483", "0.63473994", "0.63312566", "0.6320566", "0.627342", "0.5804835", "0.5310829", "0.52230453", "0.5216291", "0.52108425", "0.5202547", "0.51121664", "0.5007", "0.50053954", "0.50028306", "0.49858353", "0.49467644", "0.49454975", "0.4915293...
0.7325147
2
`_readBlankNodePunctuation` reads punctuation in a blank node
_readBlankNodePunctuation(token) { var next; switch (token.type) { // Semicolon means the subject is shared; predicate and object are different case ';': next = this._readPredicate; break; // Comma means both the subject and predicate are shared; the object is different ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_readBlankNodePunctuation(token) {\n let next;\n switch (token.type) {\n // Semicolon means the subject is shared; predicate and object are different\n case ';':\n next = this._readPredicate;\n break;\n // Comma means both the subject and predicate are shared; the object is diffe...
[ "0.77609086", "0.6752973", "0.66655344", "0.6299762", "0.61920047", "0.60304093", "0.60171914", "0.5769468", "0.5769468", "0.57483387", "0.57483387", "0.5355327", "0.5355327", "0.5316641", "0.53078747", "0.526682", "0.5176863", "0.5158032", "0.5143418", "0.51324564", "0.51231...
0.78617245
0
`_readQuadPunctuation` reads punctuation after a quad
_readQuadPunctuation(token) { if (token.type !== '.') return this._error('Expected dot to follow quad', token); return this._readInTopContext; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_readPunctuation(token) {\n let next,\n graph = this._graph;\n const subject = this._subject,\n inversePredicate = this._inversePredicate;\n switch (token.type) {\n // A closing brace ends a graph\n case '}':\n if (this._graph === null) return this._error('Unexpected graph closi...
[ "0.68814456", "0.6758431", "0.62001354", "0.60665673", "0.56821835", "0.56532854", "0.5329808", "0.51418906", "0.49938396", "0.49722415", "0.49722415", "0.4972004", "0.4972004", "0.4972004", "0.49109268", "0.4836966", "0.48335683", "0.4777824", "0.47682694", "0.47672856", "0....
0.8196213
1
`_readPrefix` reads the prefix of a prefix declaration
_readPrefix(token) { if (token.type !== 'prefix') return this._error('Expected prefix to follow @prefix', token); this._prefix = token.value; return this._readPrefixIRI; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_readPrefixIRI(token) {\n if (token.type !== 'IRI') return this._error(`Expected IRI to follow prefix \"${this._prefix}:\"`, token);\n const prefixNode = this._readEntity(token);\n this._prefixes[this._prefix] = prefixNode.value;\n this._prefixCallback(this._prefix, prefixNode);\n return this._readD...
[ "0.7614059", "0.75732094", "0.6289009", "0.6243939", "0.6201978", "0.59850025", "0.5984282", "0.5904777", "0.5886489", "0.5874554", "0.58531445", "0.58531445", "0.58531445", "0.5768292", "0.5727014", "0.5703444", "0.56675696", "0.5656571", "0.56556225", "0.5649095", "0.557980...
0.8083163
1
`_readPrefixIRI` reads the IRI of a prefix declaration
_readPrefixIRI(token) { if (token.type !== 'IRI') return this._error('Expected IRI to follow prefix "' + this._prefix + ':"', token); var prefixNode = this._readEntity(token); this._prefixes[this._prefix] = prefixNode.value; this._prefixCallback(this._prefix, prefixNode); return this._readDeclar...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_readPrefixIRI(token) {\n if (token.type !== 'IRI') return this._error(`Expected IRI to follow prefix \"${this._prefix}:\"`, token);\n const prefixNode = this._readEntity(token);\n this._prefixes[this._prefix] = prefixNode.value;\n this._prefixCallback(this._prefix, prefixNode);\n return this._readD...
[ "0.81240094", "0.7777961", "0.7777961", "0.67148674", "0.6577871", "0.632091", "0.632091", "0.632091", "0.59230244", "0.5766269", "0.576007", "0.56496733", "0.5605511", "0.54308015", "0.5430432", "0.5378217", "0.5375319", "0.5301265", "0.5288187", "0.51613325", "0.514406", ...
0.8027185
1
`_readBaseIRI` reads the IRI of a base declaration
_readBaseIRI(token) { var iri = token.type === 'IRI' && this._resolveIRI(token.value); if (!iri) return this._error('Expected valid IRI to follow base declaration', token); this._setBase(iri); return this._readDeclarationPunctuation; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_readBaseIRI(token) {\n const iri = token.type === 'IRI' && this._resolveIRI(token.value);\n if (!iri) return this._error('Expected valid IRI to follow base declaration', token);\n this._setBase(iri);\n return this._readDeclarationPunctuation;\n }", "_setBase(baseIRI) {\n if (!baseIRI) {\n t...
[ "0.79569435", "0.6720596", "0.6717522", "0.6351125", "0.6351125", "0.63247305", "0.6015203", "0.5988329", "0.5657585", "0.56289494", "0.56289494", "0.56289494", "0.56289494", "0.56122094", "0.55449355", "0.54328716", "0.53467274", "0.53467274", "0.47853675", "0.47484004", "0....
0.78457433
1
`_readNamedGraphLabel` reads the label of a named graph
_readNamedGraphLabel(token) { switch (token.type) { case 'IRI': case 'blank': case 'prefixed': return this._readSubject(token), this._readGraph; case '[': return this._readNamedGraphBlankLabel; default: return this._error('Invalid graph label', token); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_readNamedGraphLabel(token) {\n switch (token.type) {\n case 'IRI':\n case 'blank':\n case 'prefixed':\n return this._readSubject(token), this._readGraph;\n case '[':\n return this._readNamedGraphBlankLabel;\n default:\n return this._error('Invalid graph label', tok...
[ "0.850451", "0.71803695", "0.7162284", "0.58784044", "0.55523115", "0.54022706", "0.53888065", "0.5361787", "0.5358352", "0.5119441", "0.51142585", "0.5101293", "0.50954676", "0.50779074", "0.5067019", "0.50618017", "0.50618017", "0.50618017", "0.50587153", "0.5053082", "0.50...
0.8495115
1
`_readNamedGraphLabel` reads a blank node label of a named graph
_readNamedGraphBlankLabel(token) { if (token.type !== ']') return this._error('Invalid graph label', token); this._subject = this._blank(); return this._readGraph; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_readNamedGraphBlankLabel(token) {\n if (token.type !== ']') return this._error('Invalid graph label', token);\n this._subject = this._blankNode();\n return this._readGraph;\n }", "_readNamedGraphLabel(token) {\n switch (token.type) {\n case 'IRI':\n case 'blank':\n case 'prefixed':\n...
[ "0.8121923", "0.8080629", "0.8075359", "0.55513257", "0.5540651", "0.55268264", "0.5398843", "0.5384707", "0.5340969", "0.5339165", "0.53164893", "0.53164893", "0.5302332", "0.5301575", "0.52740717", "0.5220392", "0.52119035", "0.5209001", "0.5201041", "0.51677305", "0.516311...
0.80410737
3
`_readDeclarationPunctuation` reads the punctuation of a declaration
_readDeclarationPunctuation(token) { // SPARQL-style declarations don't have punctuation if (this._sparqlStyle) { this._sparqlStyle = false; return this._readInTopContext(token); } if (token.type !== '.') return this._error('Expected declaration to end with a dot', token); return this._...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_readDeclarationPunctuation(token) {\n // SPARQL-style declarations don't have punctuation\n if (this._sparqlStyle) {\n this._sparqlStyle = false;\n return this._readInTopContext(token);\n }\n if (token.type !== '.') return this._error('Expected declaration to end with a dot', token);\n re...
[ "0.78030926", "0.6627417", "0.65781534", "0.5616789", "0.5616789", "0.5383614", "0.53726065", "0.50959045", "0.4965383", "0.49446204", "0.48733255", "0.47770056", "0.4757587", "0.47470585", "0.4722714", "0.46877366", "0.46717688", "0.46429121", "0.4634343", "0.4601469", "0.46...
0.77874136
1
`_getPathReader` reads a potential path and then resumes with the given function
_getPathReader(afterPath) { this._afterPath = afterPath; return this._readPath; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function userRead(path) {\n path = normalizePath(path)\n if (u.any(path, (e) => (e == null))) throw new Error(`READ ERROR: undefined / null present in path: ${path}`)\n handlePossibleConflict(registry.conflictingWithRead(path))\n registry.addRead(id, path)\n return Promise.resolve()\n ...
[ "0.5323999", "0.5267418", "0.5247876", "0.5198146", "0.51842165", "0.5135789", "0.51138645", "0.5107901", "0.5070742", "0.50685245", "0.5049242", "0.4998413", "0.49618298", "0.4955576", "0.49532616", "0.49118355", "0.47887588", "0.47818696", "0.47665435", "0.4761091", "0.4743...
0.6516312
1
`_readPath` reads a potential path
_readPath(token) { switch (token.type) { // Forward path case '!': return this._readForwardPath; // Backward path case '^': return this._readBackwardPath; // Not a path; resume reading where we left off default: var stack = this._contextStack, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ReadFile(path)\n{\n\treturn _fs.readFileSync(path, \"utf8\").toString();\n}", "function userRead(path) {\n path = normalizePath(path)\n if (u.any(path, (e) => (e == null))) throw new Error(`READ ERROR: undefined / null present in path: ${path}`)\n handlePossibleConflict(registry.conflicti...
[ "0.6395309", "0.63302195", "0.63261205", "0.6287033", "0.62486476", "0.62486476", "0.62049997", "0.60974205", "0.60781723", "0.60342246", "0.5937383", "0.5903958", "0.5884239", "0.5838244", "0.56952316", "0.56882006", "0.5684637", "0.5652171", "0.56301993", "0.5629934", "0.56...
0.5823288
14
`_readForwardPath` reads a '!' path
_readForwardPath(token) { var subject, predicate, object = this._blank(); // The next token is the predicate if ((predicate = this._readEntity(token)) === undefined) return; // If we were reading a subject, replace the subject by the path's object if (this._predicate === null) subject = t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_readForwardPath(token) {\n let subject, predicate;\n const object = this._blankNode();\n // The next token is the predicate\n if ((predicate = this._readEntity(token)) === undefined) return;\n // If we were reading a subject, replace the subject by the path's object\n if (this._predicate === nul...
[ "0.67189157", "0.63019836", "0.6120926", "0.59482056", "0.59425586", "0.58776695", "0.58776695", "0.56701493", "0.5452136", "0.533108", "0.52691674", "0.52588177", "0.52588177", "0.52383107", "0.51784", "0.51568806", "0.51383173", "0.512346", "0.51090884", "0.5061888", "0.501...
0.6734449
0
`_readBackwardPath` reads a '^' path
_readBackwardPath(token) { var subject = this._blank(), predicate, object; // The next token is the predicate if ((predicate = this._readEntity(token)) === undefined) return; // If we were reading a subject, replace the subject by the path's subject if (this._predicate === null) object = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_readBackwardPath(token) {\n const subject = this._blankNode();\n let predicate, object;\n // The next token is the predicate\n if ((predicate = this._readEntity(token)) === undefined) return;\n // If we were reading a subject, replace the subject by the path's subject\n if (this._predicate === n...
[ "0.66445065", "0.6277973", "0.6182566", "0.6182566", "0.6038363", "0.5705278", "0.5703107", "0.5303424", "0.52710557", "0.52543676", "0.52543676", "0.5233649", "0.5233649", "0.5171579", "0.5164946", "0.51088274", "0.50897455", "0.50897455", "0.5060933", "0.50491536", "0.50415...
0.66690755
0
`_getContextEndReader` gets the next reader function at the end of a context
_getContextEndReader() { var contextStack = this._contextStack; if (!contextStack.length) return this._readPunctuation; switch (contextStack[contextStack.length - 1].type) { case 'blank': return this._readBlankNodeTail; case 'list': return this._readListItem; case 'formu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_getContextEndReader() {\n const contextStack = this._contextStack;\n if (!contextStack.length) return this._readPunctuation;\n switch (contextStack[contextStack.length - 1].type) {\n case 'blank':\n return this._readBlankNodeTail;\n case 'list':\n return this._readListItem;\n ...
[ "0.83730656", "0.5948793", "0.5769571", "0.5651849", "0.546531", "0.538183", "0.5277526", "0.5268066", "0.5250471", "0.52422065", "0.52122915", "0.5211986", "0.51808995", "0.51786375", "0.5171335", "0.51676244", "0.51402074", "0.51271266", "0.50859475", "0.50016123", "0.50016...
0.83214384
1
`_emit` sends a quad through the callback
_emit(subject, predicate, object, graph) { this._callback(null, this._quad(subject, predicate, object, graph || this.DEFAULTGRAPH)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function emitAsync(args){\n\t\tsetTimeout(function(){\n\t\t\temit.apply(evented, args);\n\t\t}, 0);\n\t}", "emit(evt) {\n\t\tif (!Duplex.prototype._flush && evt === 'finish') {\n\t\t\tthis._flush((err) => {\n\t\t\t\tif (err) EventEmitter.prototype.emit.call(this, 'error', err);\n\t\t\t\telse EventEmitter.prototy...
[ "0.62966126", "0.61652035", "0.61259556", "0.59945583", "0.59804755", "0.59781903", "0.5845727", "0.57151544", "0.5664771", "0.5623017", "0.5527038", "0.5450021", "0.54499036", "0.5447092", "0.5433503", "0.5421836", "0.54019994", "0.540107", "0.53901756", "0.5361874", "0.5357...
0.6997812
1
`_error` emits an error message through the callback
_error(message, token) { var err = new Error(message + ' on line ' + token.line + '.'); err.context = { token: token, line: token.line, previousToken: this._lexer.previousToken }; this._callback(err); this._callback = noop; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function error (err) {\n if(error.err) return;\n callback(error.err = err);\n }", "function error(err) {\n if (error.err) return;\n callback((error.err = err));\n }", "function error(err) {\n if (error.err) return;\n callback((error.err = err));\n }", "function error(err) {\n if (erro...
[ "0.8404502", "0.8142548", "0.8142548", "0.8142548", "0.79849565", "0.78724515", "0.757908", "0.7576092", "0.7535689", "0.73622715", "0.7335543", "0.73047394", "0.72367895", "0.7234045", "0.7203097", "0.7197571", "0.71827203", "0.71827203", "0.71827203", "0.71714395", "0.71552...
0.6671105
98
`_resolveIRI` resolves an IRI against the base path
_resolveIRI(iri) { return /^[a-z][a-z0-9+.-]*:/i.test(iri) ? iri : this._resolveRelativeIRI(iri); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resolveIRI(iri) {\n\t // Strip off possible angular brackets\n\t if (iri[0] === '<') iri = iri.substring(1, iri.length - 1);\n\t // Return absolute IRIs unmodified\n\t if (/^[a-z]+:/.test(iri)) return iri;\n\t if (!Parser.base) throw new Error('Cannot resolve relative IRI ' + iri + ' becaus...
[ "0.79828596", "0.79415953", "0.79415953", "0.78207827", "0.7802529", "0.6162489", "0.6140261", "0.6120589", "0.58110005", "0.5781348", "0.5781348", "0.5781348", "0.5781348", "0.576244", "0.57585454", "0.5450994", "0.53865653", "0.53783303", "0.5360448", "0.5311152", "0.519399...
0.8068188
1
`_resolveRelativeIRI` resolves an IRI against the base path, assuming that a base path has been set and that the IRI is indeed relative
_resolveRelativeIRI(iri) { // An empty relative IRI indicates the base IRI if (!iri.length) return this._base; // Decide resolving strategy based in the first character switch (iri[0]) { // Resolve relative fragment IRIs against the base IRI case '#': return this._base + iri; // R...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_resolveRelativeIRI(iri) {\n // An empty relative IRI indicates the base IRI\n if (!iri.length) return this._base;\n // Decide resolving strategy based in the first character\n switch (iri[0]) {\n // Resolve relative fragment IRIs against the base IRI\n case '#':\n return this._base + ...
[ "0.86428714", "0.8360286", "0.83585906", "0.83585906", "0.7871304", "0.7871304", "0.67488664", "0.6355965", "0.61311865", "0.6120431", "0.6098657", "0.6082104", "0.60787135", "0.60786074", "0.6060227", "0.6058893", "0.6005004", "0.59895945", "0.59895945", "0.59895945", "0.598...
0.86149454
1
`_removeDotSegments` resolves './' and '../' path segments in an IRI as per RFC3986
_removeDotSegments(iri) { // Don't modify the IRI if it does not contain any dot segments if (!/(^|\/)\.\.?($|[/#?])/.test(iri)) return iri; // Start with an imaginary slash before the IRI in order to resolve trailing './' and '../' var result = '', length = iri.length, i = -1, path...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_removeDotSegments(iri) {\n // Don't modify the IRI if it does not contain any dot segments\n if (!/(^|\\/)\\.\\.?($|[/#?])/.test(iri)) return iri;\n\n // Start with an imaginary slash before the IRI in order to resolve trailing './' and '../'\n const length = iri.length;\n let result = '',\n i...
[ "0.8424713", "0.74664336", "0.7400811", "0.7400811", "0.7400811", "0.7400811", "0.7400811", "0.71270174", "0.7056759", "0.7018746", "0.69271487", "0.6912095", "0.6912095", "0.6912095", "0.6912095", "0.6895559", "0.6895559", "0.6895559", "0.6895559", "0.6474329", "0.63999236",...
0.8302426
1
Public methods `parse` parses the N3 input and emits each parsed quad through the callback
parse(input, quadCallback, prefixCallback) { var self = this; // The read callback is the next function to be executed when a token arrives. // We start reading in the top context. this._readCallback = this._readInTopContext; this._sparqlStyle = false; this._prefixes = Object.create(null); this...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "parse(input, quadCallback, prefixCallback) {\n // The read callback is the next function to be executed when a token arrives.\n // We start reading in the top context.\n this._readCallback = this._readInTopContext;\n this._sparqlStyle = false;\n this._prefixes = Object.create(null);\n this._prefi...
[ "0.6472662", "0.6397537", "0.6014223", "0.6014223", "0.6014223", "0.6004389", "0.6004389", "0.57033914", "0.53167236", "0.5197986", "0.5163199", "0.5163199", "0.5086828", "0.5024448", "0.4964966", "0.4882088", "0.48307273", "0.47159672", "0.47059593", "0.4689837", "0.46885464...
0.64635265
1
Public properties `size` returns the number of quads in the store
get size() { // Return the quad count if if was cached var size = this._size; if (size !== null) return size; // Calculate the number of quads by counting to the deepest level size = 0; var graphs = this._graphs, subjects, subject; for (var graphKey in graphs) for (var subjectK...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get length() {\n return this.store.size;\n }", "get size() {\n // Return the quad count if if was cached\n let size = this._size;\n if (size !== null) return size;\n\n // Calculate the number of quads by counting to the deepest level\n size = 0;\n const graphs = this._graphs;\n let subje...
[ "0.7153831", "0.7116161", "0.70697916", "0.697887", "0.68331915", "0.68331915", "0.68331915", "0.6774795", "0.6707023", "0.67031133", "0.670147", "0.6693013", "0.6677098", "0.6677098", "0.6663063", "0.66559577", "0.66559577", "0.6621754", "0.6592694", "0.65358466", "0.6535846...
0.6945823
4
Private methods `_addToIndex` adds a quad to a threelayered index. Returns if the index has changed, if the entry did not already exist.
_addToIndex(index0, key0, key1, key2) { // Create layers as necessary var index1 = index0[key0] || (index0[key0] = {}); var index2 = index1[key1] || (index1[key1] = {}); // Setting the key to _any_ value signals the presence of the quad var existed = key2 in index2; if (!existed) index2[key2] = nul...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_addToIndex(index0, key0, key1, key2) {\n // Create layers as necessary\n const index1 = index0[key0] || (index0[key0] = {});\n const index2 = index1[key1] || (index1[key1] = {});\n // Setting the key to _any_ value signals the presence of the quad\n const existed = (key2 in index2);\n if (!exist...
[ "0.73321694", "0.72022253", "0.62508845", "0.6250777", "0.54112244", "0.52901673", "0.5036208", "0.5036208", "0.49751672", "0.49751672", "0.4967683", "0.4944625", "0.49167642", "0.48615232", "0.4842948", "0.48147637", "0.48136035", "0.47972637", "0.4795316", "0.47843364", "0....
0.73176354
1
`_removeFromIndex` removes a quad from a threelayered index
_removeFromIndex(index0, key0, key1, key2) { // Remove the quad from the index var index1 = index0[key0], index2 = index1[key1], key; delete index2[key2]; // Remove intermediary index layers if they are empty for (key in index2) return; delete index1[key1]; for (key in index1)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_removeFromIndex(index0, key0, key1, key2) {\n // Remove the quad from the index\n const index1 = index0[key0],\n index2 = index1[key1];\n delete index2[key2];\n\n // Remove intermediary index layers if they are empty\n for (const key in index2) return;\n delete index1[key1];\n for (const...
[ "0.80489385", "0.76820415", "0.6485255", "0.64463085", "0.6265227", "0.6227085", "0.61634463", "0.6057121", "0.6030279", "0.5967511", "0.5952977", "0.5937316", "0.57715", "0.5740443", "0.5703696", "0.569057", "0.56397116", "0.5629484", "0.55998695", "0.55807555", "0.55667585"...
0.80579114
0
`_findInIndex` finds a set of quads in a threelayered index. The index base is `index0` and the keys at each level are `key0`, `key1`, and `key2`. Any of these keys can be undefined, which is interpreted as a wildcard. `name0`, `name1`, and `name2` are the names of the keys at each level, used when reconstructing the r...
_findInIndex(index0, key0, key1, key2, name0, name1, name2, graph, callback, array) { var tmp, index1, index2, varCount = !key0 + !key1 + !key2, // depending on the number of variables, keys or reverse index are faster entityKeys = varCount > 1 ? Object.keys(this._ids) : this._en...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_findInIndex (index0, key0, key1, key2, name0, name1, name2, graph, callback, array) {\n let tmp, index1, index2\n\n // If a key is specified, use only that part of index 0.\n if (key0) {\n (tmp = index0, index0 = {})[key0] = tmp[key0]\n }\n\n for (const value0 in index0) {\n index1 = inde...
[ "0.78408784", "0.64398384", "0.5176665", "0.5089145", "0.49731013", "0.49315634", "0.4897678", "0.48282793", "0.480586", "0.47572744", "0.4729669", "0.46945047", "0.4674561", "0.4674561", "0.4523458", "0.45227858", "0.44748586", "0.44739255", "0.4419621", "0.44030482", "0.437...
0.7298835
1
`_loop` executes the callback on all keys of index 0
_loop(index0, callback) { for (var key0 in index0) callback(key0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_loop(index0, callback) {\n for (const key0 in index0) callback(key0);\n }", "_loopByKey0(index0, key0, callback) {\n var index1, key1;\n\n if (index1 = index0[key0]) {\n for (key1 in index1) callback(key1);\n }\n }", "_loopByKey0(index0, key0, callback) {\n let index1, key1;\n if (ind...
[ "0.88039947", "0.7869417", "0.7817441", "0.71758217", "0.7131474", "0.6489654", "0.6413254", "0.6270351", "0.61357725", "0.60708266", "0.6026539", "0.60255134", "0.59760845", "0.59747785", "0.59747785", "0.5972444", "0.594405", "0.58730114", "0.5825033", "0.5822271", "0.57741...
0.8680422
1
`_loopByKey0` executes the callback on all keys of a certain entry in index 0
_loopByKey0(index0, key0, callback) { var index1, key1; if (index1 = index0[key0]) { for (key1 in index1) callback(key1); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_loopByKey0(index0, key0, callback) {\n let index1, key1;\n if (index1 = index0[key0]) {\n for (key1 in index1) callback(key1);\n }\n }", "_loop(index0, callback) {\n for (const key0 in index0) callback(key0);\n }", "_loop(index0, callback) {\n for (var key0 in index0) callback(key0);\n ...
[ "0.82364786", "0.80822164", "0.7900406", "0.7501755", "0.7417061", "0.6348023", "0.6286556", "0.6284799", "0.54459244", "0.5430652", "0.5414705", "0.54091746", "0.53835696", "0.53835696", "0.5363771", "0.5363771", "0.5363771", "0.53353643", "0.53215027", "0.53215027", "0.5291...
0.8330241
0
`_loopByKey1` executes the callback on given keys of all entries in index 0
_loopByKey1(index0, key1, callback) { var key0, index1; for (key0 in index0) { index1 = index0[key0]; if (index1[key1]) callback(key0); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_loopByKey1(index0, key1, callback) {\n let key0, index1;\n for (key0 in index0) {\n index1 = index0[key0];\n if (index1[key1]) callback(key0);\n }\n }", "_loopByKey0(index0, key0, callback) {\n var index1, key1;\n\n if (index1 = index0[key0]) {\n for (key1 in index1) callback(key1...
[ "0.8064251", "0.8004332", "0.7999963", "0.77970904", "0.7608474", "0.7136825", "0.70951355", "0.6457228", "0.59976035", "0.581152", "0.55469847", "0.5520478", "0.5486542", "0.5486542", "0.54062253", "0.53993875", "0.5376303", "0.53756917", "0.5354619", "0.5316695", "0.5300898...
0.8138653
0
`_loopBy2Keys` executes the callback on given keys of certain entries in index 2
_loopBy2Keys(index0, key0, key1, callback) { var index1, index2, key2; if ((index1 = index0[key0]) && (index2 = index1[key1])) { for (key2 in index2) callback(key2); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_loopBy2Keys(index0, key0, key1, callback) {\n let index1, index2, key2;\n if ((index1 = index0[key0]) && (index2 = index1[key1])) {\n for (key2 in index2) callback(key2);\n }\n }", "_loopByKey1(index0, key1, callback) {\n let key0, index1;\n for (key0 in index0) {\n index1 = index0[key...
[ "0.84464264", "0.76529104", "0.7576332", "0.74272317", "0.73854667", "0.7297838", "0.7214255", "0.6256411", "0.61172575", "0.5751048", "0.57423764", "0.5580845", "0.5515391", "0.5491844", "0.5491844", "0.5491844", "0.5491844", "0.5491844", "0.5491844", "0.5491844", "0.5491844...
0.8409485
1
`_countInIndex` counts matching quads in a threelayered index. The index base is `index0` and the keys at each level are `key0`, `key1`, and `key2`. Any of these keys can be undefined, which is interpreted as a wildcard.
_countInIndex(index0, key0, key1, key2) { var count = 0, tmp, index1, index2; // If a key is specified, count only that part of index 0 if (key0) (tmp = index0, index0 = {})[key0] = tmp[key0]; for (var value0 in index0) { if (index1 = index0[value0]) { // If a key is ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_countInIndex(index0, key0, key1, key2) {\n let count = 0,\n tmp,\n index1,\n index2;\n\n // If a key is specified, count only that part of index 0\n if (key0) (tmp = index0, index0 = {})[key0] = tmp[key0];\n for (const value0 in index0) {\n if (index1 = index0[value0]) {\n /...
[ "0.74712974", "0.74520946", "0.60354096", "0.5461233", "0.4941189", "0.4900548", "0.46947926", "0.46938396", "0.4603144", "0.4556407", "0.45534545", "0.45346257", "0.45157486", "0.4499256", "0.449548", "0.445806", "0.44366986", "0.44228837", "0.44212684", "0.44096768", "0.440...
0.74680734
1
`_getGraphs` returns an array with the given graph, or all graphs if the argument is null or undefined.
_getGraphs(graph) { if (!isString(graph)) return this._graphs; var graphs = {}; graphs[graph] = this._graphs[graph]; return graphs; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_getGraphs(graph) {\n if (!isString(graph)) return this._graphs;\n const graphs = {};\n graphs[graph] = this._graphs[graph];\n return graphs;\n }", "_getGraphs (graph) {\n if (!isString(graph)) {\n return this._graphs\n }\n\n return {\n [graph]: this._graphs[graph]\n }\n }", ...
[ "0.6904452", "0.6621659", "0.6253495", "0.60858935", "0.5942391", "0.55883056", "0.52766347", "0.5177246", "0.5159586", "0.49352467", "0.49311185", "0.4929274", "0.49197197", "0.49179542", "0.47632983", "0.4731338", "0.4724747", "0.4683864", "0.4683864", "0.46286276", "0.4627...
0.7004812
0
`_uniqueEntities` returns a function that accepts an entity ID and passes the corresponding entity to callback if it hasn't occurred before.
_uniqueEntities(callback) { var uniqueIds = Object.create(null), entities = this._entities; return function (id) { if (!(id in uniqueIds)) { uniqueIds[id] = true; callback(fromId(entities[id])); } }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_uniqueEntities(callback) {\n const uniqueIds = Object.create(null);\n return id => {\n if (!(id in uniqueIds)) {\n uniqueIds[id] = true;\n callback((0, _N3DataFactory.termFromId)(this._entities[id], this._factory));\n }\n };\n }", "function UID() {\n var id = GUID++;\n //...
[ "0.8016544", "0.57158136", "0.49529144", "0.4878715", "0.4701319", "0.46961814", "0.46467033", "0.46349147", "0.4633618", "0.46316448", "0.45664403", "0.45353058", "0.44980243", "0.44854474", "0.44497842", "0.44363454", "0.44321805", "0.44321805", "0.4430667", "0.4420425", "0...
0.8487552
0
Public methods `addQuad` adds a new quad to the store. Returns if the quad index has changed, if the quad did not already exist.
addQuad(subject, predicate, object, graph) { // Shift arguments if a quad object is given instead of components if (!predicate) graph = subject.graph, object = subject.object, predicate = subject.predicate, subject = subject.subject; // Convert terms to internal string representation subject = toId(subject...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "add(quad) {\n this.addQuad(quad);\n return this;\n }", "addQuad(subject, predicate, object, graph) {\n // Shift arguments if a quad object is given instead of components\n if (!predicate) graph = subject.graph, object = subject.object, predicate = subject.predicate, subject = subject.subject;\n\n ...
[ "0.6544247", "0.61315495", "0.5491925", "0.5491925", "0.54670376", "0.54167455", "0.54167455", "0.53889924", "0.52281076", "0.51928467", "0.5141097", "0.5108743", "0.49878067", "0.49588636", "0.49114156", "0.4800249", "0.4703672", "0.46740067", "0.46740067", "0.4672086", "0.4...
0.62549573
1
`addQuads` adds multiple quads to the store
addQuads(quads) { for (var i = 0; i < quads.length; i++) this.addQuad(quads[i]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addQuads(quads) {\n for (let i = 0; i < quads.length; i++) this.addQuad(quads[i]);\n }", "addQuads(quads) {\n for (let i = 0; i < quads.length; i++) this.addQuad(quads[i]);\n }", "function\nadd_quats(q1, q2)\n{\n var t1 = [], t2 = [], t3 = [], tf = [];\n var dest = [];\n \n t1[0] = q1[0];\n...
[ "0.79070395", "0.79070395", "0.5918659", "0.5538688", "0.54600763", "0.5406647", "0.52636546", "0.50940233", "0.507828", "0.5028092", "0.50130504", "0.49518722", "0.49483317", "0.4942426", "0.49132133", "0.48796675", "0.4864326", "0.4832816", "0.48291817", "0.48247227", "0.47...
0.7945845
1
`import` adds a stream of quads to the store
import(stream) { var self = this; stream.on('data', function (quad) { self.addQuad(quad); }); return stream; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "import(stream) {\n stream.on('data', quad => {\n this.addQuad(quad);\n });\n return stream;\n }", "import(stream) {\n stream.on('data', quad => {\n this.write(quad);\n });\n stream.on('end', () => {\n this.end();\n });\n stream.on('error', error => {\n this.emit('erro...
[ "0.66434705", "0.5731246", "0.5731246", "0.5654885", "0.5350673", "0.52583635", "0.5224818", "0.5202692", "0.50710994", "0.5028232", "0.50276285", "0.50062996", "0.4978115", "0.49269235", "0.49247503", "0.49247503", "0.48855737", "0.48792756", "0.48218957", "0.4776689", "0.47...
0.6458251
1
`removeQuad` removes a quad from the store if it exists
removeQuad(subject, predicate, object, graph) { // Shift arguments if a quad object is given instead of components if (!predicate) graph = subject.graph, object = subject.object, predicate = subject.predicate, subject = subject.subject; // Convert terms to internal string representation subject = toId(subj...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "delete(quad) {\n this.removeQuad(quad);\n return this;\n }", "removeQuad(subject, predicate, object, graph) {\n // Shift arguments if a quad object is given instead of components\n if (!predicate) graph = subject.graph, object = subject.object, predicate = subject.predicate, subject = subject.subjec...
[ "0.69487715", "0.6799048", "0.63947767", "0.63874274", "0.6049506", "0.5715537", "0.56169975", "0.5581773", "0.5567491", "0.5549862", "0.5522295", "0.55073035", "0.54945123", "0.5492987", "0.5465952", "0.5419269", "0.54115206", "0.53999144", "0.53954667", "0.5391142", "0.5355...
0.67348295
2
`removeQuads` removes multiple quads from the store
removeQuads(quads) { for (var i = 0; i < quads.length; i++) this.removeQuad(quads[i]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "removeQuads(quads) {\n for (let i = 0; i < quads.length; i++) this.removeQuad(quads[i]);\n }", "function deleteQs() {\n return db.Question.remove({})\n}", "remove (queries, multi = false) {\n let removed = [];\n if (Helpers.is(queries, '!Object')) {\n for (let key of (Array.i...
[ "0.80752355", "0.6608208", "0.5775217", "0.57355595", "0.57355595", "0.5678045", "0.5678045", "0.54421127", "0.5305914", "0.53054065", "0.5224891", "0.521805", "0.5190106", "0.51499206", "0.51447105", "0.509452", "0.50903684", "0.50870484", "0.5086995", "0.5086995", "0.508699...
0.8061671
1
`remove` removes a stream of quads from the store
remove(stream) { var self = this; stream.on('data', function (quad) { self.removeQuad(quad); }); return stream; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "remove(stream) {\n stream.on('data', quad => {\n this.removeQuad(quad);\n });\n return stream;\n }", "removeQuads(quads) {\n for (let i = 0; i < quads.length; i++) this.removeQuad(quads[i]);\n }", "removeQuads(quads) {\n for (var i = 0; i < quads.length; i++) this.removeQuad(quads[i]);\n ...
[ "0.67813987", "0.6451626", "0.63170177", "0.62909573", "0.58477724", "0.58240247", "0.58141243", "0.58045065", "0.5800793", "0.5797602", "0.5770991", "0.5751042", "0.5741728", "0.57351243", "0.5699336", "0.5661303", "0.5659925", "0.56351554", "0.5629657", "0.5629025", "0.5628...
0.6547167
1
`removeMatches` removes all matching quads from the store Setting any field to `undefined` or `null` indicates a wildcard.
removeMatches(subject, predicate, object, graph) { return this.remove(this.match(subject, predicate, object, graph)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "removeMatches(subject, predicate, object, graph) {\n const stream = new _readableStream.Readable({\n objectMode: true\n });\n stream._read = () => {\n for (const quad of this.readQuads(subject, predicate, object, graph)) stream.push(quad);\n stream.push(null);\n };\n return this.remov...
[ "0.5838346", "0.58209103", "0.5729242", "0.5675067", "0.5552887", "0.54564184", "0.52202237", "0.52033406", "0.52033406", "0.52033406", "0.52033406", "0.5129699", "0.5109104", "0.50956947", "0.50807595", "0.5079825", "0.5028579", "0.4980735", "0.49795032", "0.49607825", "0.49...
0.521462
7
`deleteGraph` removes all triples with the given graph from the store
deleteGraph(graph) { return this.removeMatches(null, null, null, graph); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "removeVertex(vertex) {\n this.nodes.delete(vertex);\n vertex.adjacent.forEach(node => node.adjacent.delete(vertex));\n // for(let node of this.nodes) {\n // node.adjacent.delete(vertex);\n // }\n }", "removeVertex(vertex) {\n // remove links to the vertex's adjacencies\n for (let link of ...
[ "0.6245231", "0.6037203", "0.60208255", "0.5972022", "0.5972022", "0.5971285", "0.59301746", "0.5885154", "0.5883319", "0.5777073", "0.5777073", "0.57460093", "0.5680957", "0.56736535", "0.5614442", "0.5579904", "0.55360174", "0.5491518", "0.5476754", "0.54340047", "0.5429572...
0.7488083
1
`getQuads` returns an array of quads matching a pattern. Setting any field to `undefined` or `null` indicates a wildcard.
getQuads(subject, predicate, object, graph) { // Convert terms to internal string representation subject = subject && toId(subject); predicate = predicate && toId(predicate); object = object && toId(object); graph = graph && toId(graph); var quads = [], graphs = this._getGraphs(graph), ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getQuads(subject, predicate, object, graph) {\n return [...this.readQuads(subject, predicate, object, graph)];\n }", "function $qsa(q) {\n\treturn Array.from(document.querySelectorAll(q));\n}", "function qsa(query) {\n return document.querySelectorAll(query);\n }", "function $all(q) {\n\treturn docum...
[ "0.51374054", "0.48507547", "0.47232422", "0.4714946", "0.4648045", "0.46289995", "0.4626506", "0.45421287", "0.45317927", "0.44947413", "0.4489743", "0.44615322", "0.44615322", "0.44609714", "0.44428766", "0.44183132", "0.4407115", "0.43959814", "0.43896067", "0.43555325", "...
0.44155097
16
`match` returns a stream of quads matching a pattern. Setting any field to `undefined` or `null` indicates a wildcard.
match(subject, predicate, object, graph) { var stream = new _stream.Readable({ objectMode: true }); // Initialize stream once it is being read stream._read = () => { for (var quad of this.getQuads(subject, predicate, object, graph)) stream.push(quad); stream.push(null); }; retur...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "match(input){ return null }", "match(pattern) {\n if (this.probe(pattern)) {\n return this.consume();\n }\n\n return null;\n }", "function match(val) {\n return val != null ? filter(val) : \"\";\n }", "function matchAll(str, rgx, opt_fnMapper) {\r\n var arr, extras, matches = [];\r\n ...
[ "0.5802165", "0.5769568", "0.544094", "0.5376049", "0.5343749", "0.51867396", "0.5107228", "0.5058732", "0.49708313", "0.49623832", "0.48847756", "0.48532614", "0.48447067", "0.48055312", "0.4802258", "0.4789039", "0.47740927", "0.47686604", "0.47289303", "0.47197223", "0.471...
0.46687573
25
`countQuads` returns the number of quads matching a pattern. Setting any field to `undefined` or `null` indicates a wildcard.
countQuads(subject, predicate, object, graph) { // Convert terms to internal string representation subject = subject && toId(subject); predicate = predicate && toId(predicate); object = object && toId(object); graph = graph && toId(graph); var count = 0, graphs = this._getGraphs(graph),...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function countQ(q, callback) {\n if (q == null) return callback(null, 0)\n q.count(callback)\n}", "function count() {\n\t var clean = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : filter.ignoreMissing;\n\t\n\t return function (values) {\n\t var cleanValues = clean(values);\n\...
[ "0.5636109", "0.54659873", "0.53624016", "0.5181792", "0.5015941", "0.4974502", "0.49135932", "0.48714426", "0.48662218", "0.48446476", "0.48274538", "0.48271415", "0.48002788", "0.47905228", "0.47478464", "0.47362277", "0.47321776", "0.47072184", "0.4693827", "0.46509355", "...
0.5109733
4
`forEach` executes the callback on all quads. Setting any field to `undefined` or `null` indicates a wildcard.
forEach(callback, subject, predicate, object, graph) { this.some(function (quad) { callback(quad); return false; }, subject, predicate, object, graph); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function qsaEach(selector, callback) {\n\t[].slice.call(d.querySelectorAll(selector)).forEach(callback);\n}", "function each(ary,func) {\n var i = 0;\n while (ary[i] != null) {\n func(ary[i],i);\n i++;\n }\n}", "function __for_each(arr, Fn) {\n\t\tArray.prototype.slice.call((typeof arr === 'string' ? ...
[ "0.5969496", "0.5105796", "0.49963117", "0.49586028", "0.4888652", "0.48379767", "0.48379767", "0.4836057", "0.4828447", "0.48017144", "0.47960132", "0.47835347", "0.47828272", "0.47765484", "0.47365314", "0.47242537", "0.47097978", "0.47083393", "0.47074652", "0.47007313", "...
0.47811714
13
`every` executes the callback on all quads, and returns `true` if it returns truthy for all them. Setting any field to `undefined` or `null` indicates a wildcard.
every(callback, subject, predicate, object, graph) { var some = false; var every = !this.some(function (quad) { some = true; return !callback(quad); }, subject, predicate, object, graph); return some && every; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "any() {\n return Object.keys(this._rawQuery).length > 0;\n }", "any() {\n return Object.keys(this._rawQuery).length > 0;\n }", "function all(iter, f) {\n if (iter.length === 0)\n return true;\n return iter.map(f).reduce(\n function (a, b) { return (!!a) && (!!b); }\n );\n}", "eve...
[ "0.60831803", "0.60831803", "0.6022702", "0.598334", "0.5826092", "0.58048594", "0.578566", "0.56808126", "0.5655766", "0.5639528", "0.5634413", "0.561131", "0.5582476", "0.5577741", "0.557537", "0.557537", "0.557537", "0.55380243", "0.55295324", "0.5525963", "0.5511829", "...
0.6048762
2
`some` executes the callback on all quads, and returns `true` if it returns truthy for any of them. Setting any field to `undefined` or `null` indicates a wildcard.
some(callback, subject, predicate, object, graph) { // Convert terms to internal string representation subject = subject && toId(subject); predicate = predicate && toId(predicate); object = object && toId(object); graph = graph && toId(graph); var graphs = this._getGraphs(graph), conten...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "any() {\n return Object.keys(this._rawQuery).length > 0;\n }", "any() {\n return Object.keys(this._rawQuery).length > 0;\n }", "some(callback, subject, predicate, object, graph) {\n for (const quad of this.readQuads(subject, predicate, object, graph)) if (callback(quad)) return true;\n ...
[ "0.6270518", "0.6270518", "0.6073442", "0.58188546", "0.58163553", "0.57416654", "0.5634857", "0.5443221", "0.53691894", "0.5343078", "0.53387284", "0.5333627", "0.53275865", "0.52951837", "0.5258212", "0.5258212", "0.5258212", "0.52320117", "0.5173089", "0.5173089", "0.51730...
0.0
-1
`getSubjects` returns all subjects that match the pattern. Setting any field to `undefined` or `null` indicates a wildcard.
getSubjects(predicate, object, graph) { var results = []; this.forSubjects(function (s) { results.push(s); }, predicate, object, graph); return results; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getSubjects(predicate, object, graph) {\n const results = [];\n this.forSubjects(s => {\n results.push(s);\n }, predicate, object, graph);\n return results;\n }", "function getAllSubjects() {\n return SubjectCollection.find()\n}", "function _filterSubjects(state, subjects, frame) {\n // fil...
[ "0.6176807", "0.5957433", "0.56710213", "0.56245553", "0.5580068", "0.5580068", "0.5580068", "0.5580068", "0.5567469", "0.5567469", "0.5567469", "0.5567469", "0.5514366", "0.5317611", "0.5316532", "0.53061944", "0.5124111", "0.5107942", "0.49383777", "0.49077794", "0.48205298...
0.62923366
0
`forSubjects` executes the callback on all subjects that match the pattern. Setting any field to `undefined` or `null` indicates a wildcard.
forSubjects(callback, predicate, object, graph) { // Convert terms to internal string representation predicate = predicate && toId(predicate); object = object && toId(object); graph = graph && toId(graph); var ids = this._ids, graphs = this._getGraphs(graph), content, predic...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "forSubjects(callback, predicate, object, graph) {\n // Convert terms to internal string representation\n predicate = predicate && (0, _N3DataFactory.termToId)(predicate);\n object = object && (0, _N3DataFactory.termToId)(object);\n graph = graph && (0, _N3DataFactory.termToId)(graph);\n const ids = ...
[ "0.5766892", "0.49299258", "0.49299258", "0.49299258", "0.49299258", "0.4787962", "0.4684552", "0.46834734", "0.46641514", "0.45996013", "0.45932385", "0.4577077", "0.45309657", "0.45309657", "0.45309657", "0.45309657", "0.44465834", "0.4365057", "0.43196312", "0.43066195", "...
0.5922726
0
`getPredicates` returns all predicates that match the pattern. Setting any field to `undefined` or `null` indicates a wildcard.
getPredicates(subject, object, graph) { var results = []; this.forPredicates(function (p) { results.push(p); }, subject, object, graph); return results; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPropertyAll(thing) {\n return Object.keys(thing.predicates).filter(predicate => getTerm(thing, predicate) !== null);\n}", "getPredicates(subject, object, graph) {\n const results = [];\n this.forPredicates(p => {\n results.push(p);\n }, subject, object, graph);\n return results;\n ...
[ "0.5374518", "0.5098134", "0.47553015", "0.47113198", "0.46619484", "0.46216184", "0.45558295", "0.45419732", "0.45277575", "0.45052594", "0.45052594", "0.44937402", "0.44937402", "0.44937402", "0.44937402", "0.44937402", "0.44937402", "0.44937402", "0.44937402", "0.44937402", ...
0.51523983
1
`forPredicates` executes the callback on all predicates that match the pattern. Setting any field to `undefined` or `null` indicates a wildcard.
forPredicates(callback, subject, object, graph) { // Convert terms to internal string representation subject = subject && toId(subject); object = object && toId(object); graph = graph && toId(graph); var ids = this._ids, graphs = this._getGraphs(graph), content, subjectId, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "forPredicates(callback, subject, object, graph) {\n // Convert terms to internal string representation\n subject = subject && (0, _N3DataFactory.termToId)(subject);\n object = object && (0, _N3DataFactory.termToId)(object);\n graph = graph && (0, _N3DataFactory.termToId)(graph);\n const ids = this._...
[ "0.5496436", "0.5320188", "0.52897716", "0.5169281", "0.4960377", "0.46949205", "0.46253216", "0.459409", "0.4549532", "0.4534123", "0.44955826", "0.44747475", "0.4470604", "0.4456544", "0.4420301", "0.44178584", "0.44158673", "0.44119662", "0.44107398", "0.44060695", "0.4328...
0.5667032
0
`getObjects` returns all objects that match the pattern. Setting any field to `undefined` or `null` indicates a wildcard.
getObjects(subject, predicate, graph) { var results = []; this.forObjects(function (o) { results.push(o); }, subject, predicate, graph); return results; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getObjects(req, res, next) {\n var location = req.param(\"location\");\n var type = req.param(\"type\");\n objectService.getObjects(location, type, (error, response) => {\n if (response == null) {\n ResponseHandler(404, response, res);\n return;\n }\n ResponseHandler(error, response,...
[ "0.57321113", "0.5505921", "0.5342923", "0.5342923", "0.5342923", "0.5342923", "0.5342923", "0.5342923", "0.5196436", "0.5173538", "0.51287717", "0.5103997", "0.51006955", "0.508284", "0.49335906", "0.4924732", "0.48532724", "0.4850526", "0.4814413", "0.48056918", "0.4788209"...
0.4599307
28
`forObjects` executes the callback on all objects that match the pattern. Setting any field to `undefined` or `null` indicates a wildcard.
forObjects(callback, subject, predicate, graph) { // Convert terms to internal string representation subject = subject && toId(subject); predicate = predicate && toId(predicate); graph = graph && toId(graph); var ids = this._ids, graphs = this._getGraphs(graph), content, sub...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "forAllObjects (fcn, obj = {}) {\n for (var i = 0, len = this.length; i < len; i++) {\n this.getObject(i, obj)\n fcn(obj, i)\n }\n }", "function each(obj, fn) {\n\t\tif (!obj) { return; }\n\t\t\n\t\tvar name, i = 0, length = obj.length;\n\t\n\t\t// object\n\t\tif (length === undefined) {\n\t\t\tf...
[ "0.62896144", "0.5294565", "0.5264459", "0.5259333", "0.52489483", "0.5224131", "0.51551855", "0.49985072", "0.49851513", "0.4911743", "0.49031526", "0.48877436", "0.48859093", "0.48240507", "0.4818324", "0.48179173", "0.48179173", "0.48179173", "0.48002985", "0.477972", "0.4...
0.5166791
6
`getGraphs` returns all graphs that match the pattern. Setting any field to `undefined` or `null` indicates a wildcard.
getGraphs(subject, predicate, object) { var results = []; this.forGraphs(function (g) { results.push(g); }, subject, predicate, object); return results; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_getGraphs(graph) {\n if (!isString(graph)) return this._graphs;\n var graphs = {};\n graphs[graph] = this._graphs[graph];\n return graphs;\n }", "_getGraphs(graph) {\n if (!isString(graph)) return this._graphs;\n const graphs = {};\n graphs[graph] = this._graphs[graph];\n return graphs;...
[ "0.59677696", "0.5923754", "0.56638676", "0.5471451", "0.5234849", "0.49319434", "0.47785085", "0.4463501", "0.4458098", "0.444291", "0.43151262", "0.43042257", "0.42975307", "0.42799836", "0.4240682", "0.4233762", "0.4194004", "0.41729152", "0.41727343", "0.41690886", "0.415...
0.5570817
3
`forGraphs` executes the callback on all graphs that match the pattern. Setting any field to `undefined` or `null` indicates a wildcard.
forGraphs(callback, subject, predicate, object) { for (var graph in this._graphs) { this.some(function (quad) { callback(quad.graph); return true; // Halt iteration of some() }, subject, predicate, object, graph); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "forGraphs(callback, subject, predicate, object) {\n for (const graph in this._graphs) {\n this.some(quad => {\n callback(quad.graph);\n return true; // Halt iteration of some()\n }, subject, predicate, object, graph);\n }\n }", "function fallback_graphs(data) {\n for(var s = 0; ...
[ "0.57386875", "0.5412612", "0.4864594", "0.47710904", "0.4648295", "0.4622247", "0.4499456", "0.44914895", "0.44908816", "0.44833156", "0.44327307", "0.4388592", "0.43650988", "0.43628743", "0.4319212", "0.4287838", "0.4222865", "0.4207747", "0.41953054", "0.41574168", "0.412...
0.5902526
0
`createBlankNode` creates a new blank node, returning its name
createBlankNode(suggestedName) { var name, index; // Generate a name based on the suggested name if (suggestedName) { name = suggestedName = '_:' + suggestedName, index = 1; while (this._ids[name]) name = suggestedName + index++; } // Generate a generic blank node name else { do { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function blankNode(name) {\n return new BlankNode(name || `n3-${_blankNodeCounter++}`);\n}", "createBlankNode(suggestedName) {\n let name, index;\n // Generate a name based on the suggested name\n if (suggestedName) {\n name = suggestedName = `_:${suggestedName}`, index = 1;\n while (this._id...
[ "0.8380157", "0.7874489", "0.7256366", "0.72330105", "0.7229058", "0.65646803", "0.6500355", "0.638619", "0.638619", "0.6335963", "0.6295624", "0.6295624", "0.6274032", "0.62161803", "0.6204653", "0.6172465", "0.6172465", "0.6144572", "0.6104427", "0.6099941", "0.6070184", ...
0.7756073
2
`extractLists` finds and removes all list triples and returns the items per list.
extractLists({ remove = false, ignoreErrors = false } = {}) { var lists = {}; // has scalar keys so could be a simple Object var onError = ignoreErrors ? () => true : (node, message) => { throw new Error(`${node.value} ${message}`); }; // Traverse each list from its tail var tails = th...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function flatten(lists) {\n return lists.reduce((a, b) => a.concat(b), [])\n}", "extractLists() {\n let {\n remove = false,\n ignoreErrors = false\n } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n const lists = {}; // has scalar keys so could be a simple Object...
[ "0.5884748", "0.5761006", "0.5353711", "0.5296753", "0.5271554", "0.51737994", "0.51584935", "0.4746149", "0.46844226", "0.46450692", "0.46210143", "0.4609902", "0.45294273", "0.4489868", "0.4479349", "0.44667464", "0.44561166", "0.44360393", "0.44294792", "0.44294792", "0.44...
0.57992965
1
Parses a stream of strings
import(stream) { var self = this; stream.on('data', function (chunk) { self.write(chunk); }); stream.on('end', function () { self.end(); }); stream.on('error', function (error) { self.emit('error', error); }); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _loadString(stream) {\n\tstream._index = 0;\n\tstream.data = [];\n\tfor (var i = 0; i < stream.strdata.length; i++) {\n\t\tstream.data.push(stream.strdata.charCodeAt(i));\n\t}\n\tstream._size = stream.data.length;\n}", "function _loadString(stream) {\n\tstream._index = 0;\n\tstream.data = [];\n\tfor (va...
[ "0.6758595", "0.6758595", "0.61026436", "0.61026436", "0.61026436", "0.5985196", "0.5971396", "0.589989", "0.5806555", "0.5772586", "0.5741636", "0.57256997", "0.57238144", "0.5683597", "0.5683597", "0.5665964", "0.5641478", "0.5641478", "0.5641478", "0.55620575", "0.5558563"...
0.0
-1
Serializes a stream of quads
import(stream) { var self = this; stream.on('data', function (quad) { self.write(quad); }); stream.on('end', function () { self.end(); }); stream.on('error', function (error) { self.emit('error', error); }); stream.on('prefix', function (prefix, iri) { self._write...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static serialize(dataset) {\n if (!Array.isArray(dataset)) {\n dataset = NQuads.legacyDatasetToQuads(dataset);\n }\n const quads = [];\n for (const quad of dataset) {\n quads.push(NQuads.serializeQuad(quad));\n }\n return quads.sort().join('');\n }", "static serializeQuad(quad) {\n ...
[ "0.6861117", "0.6019551", "0.58577955", "0.58053744", "0.5275998", "0.52483946", "0.51605886", "0.5149387", "0.5149387", "0.5149387", "0.5130341", "0.5125344", "0.5125344", "0.5108223", "0.5108223", "0.50604576", "0.5060367", "0.5060367", "0.50583005", "0.4980393", "0.4980393...
0.4891786
29
N3Util provides N3 utility functions. Tests whether the given term represents an IRI
function isNamedNode(term) { return !!term && term.termType === 'NamedNode'; } // Tests whether the given term represents a blank node
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isTaxID(str) {\n var locale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'en-US';\n (0, _assertString.default)(str); // Copy TIN to avoid replacement if sanitized\n\n var strcopy = str.slice(0);\n\n if (locale in taxIdFormat) {\n if (locale in sanitizeRegexes) {\n strc...
[ "0.55742806", "0.55316216", "0.5415427", "0.53645", "0.5279334", "0.52550966", "0.515398", "0.5113076", "0.50836796", "0.5067387", "0.50562096", "0.50562096", "0.50447047", "0.50229776", "0.50229776", "0.50229776", "0.50229776", "0.4982541", "0.49422032", "0.49061516", "0.489...
0.0
-1
Registers a new prefix (if an IRI was specified) or retrieves a function that expands an existing prefix (if no IRI was specified)
function processPrefix(prefix, iri) { // Create a new prefix if an IRI is specified or the prefix doesn't exist if (typeof iri === 'string') { // Create a function that expands the prefix var cache = Object.create(null); prefixes[prefix] = function (local) { return cache[local] || (ca...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function processPrefix(prefix, iri) {\n // Create a new prefix if an IRI is specified or the prefix doesn't exist\n if (iri || !(prefix in prefixes)) {\n var cache = Object.create(null);\n iri = iri || '';\n // Create a function that expands the prefix\n prefixes[prefix] = fun...
[ "0.80448467", "0.80448467", "0.80448467", "0.80366766", "0.7561046", "0.7538078", "0.6933111", "0.6744075", "0.6485078", "0.6409558", "0.63102967", "0.60833555", "0.6079281", "0.59916764", "0.5973292", "0.591262", "0.5863856", "0.58533067", "0.58462095", "0.573899", "0.572756...
0.8151312
0
Prettyprinted nodes are not equal to any other node (e.g., [] does not equal [])
equals() { return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function areEqualNodes(node1, node2) {\n return node1.row === node2.row && node1.column === node2.column;\n}", "function dump() {\n if ( noDump ) {\n return;\n }\n\n function toStr( node ) {\n if ( node === null ) {\n return \"()\";\n }\n else {\n retur...
[ "0.5848809", "0.5801354", "0.5759334", "0.5740181", "0.5599973", "0.55655867", "0.5550178", "0.5542039", "0.5515081", "0.5506402", "0.54797953", "0.54797953", "0.5437446", "0.53956425", "0.5340249", "0.53371996", "0.5334596", "0.52755934", "0.52353644", "0.5224432", "0.519665...
0.0
-1
Private methods Whether the current graph is the default graph
get _inDefaultGraph() { return DEFAULTGRAPH.equals(this._graph); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function inDefaultGraph(quad) {\n return isDefaultGraph(quad.graph);\n}", "function isDefaultGraph(term) {\n return !!term && term.termType === 'DefaultGraph';\n}", "function defaultGraph() {\n return DEFAULTGRAPH;\n}", "function createDefaultGraph(){\n currentGraph = new Graph(['a','c','d','e']);\n ...
[ "0.7859001", "0.7858718", "0.75291604", "0.64036053", "0.62937915", "0.61117953", "0.60855836", "0.60855836", "0.60855836", "0.60855836", "0.60855836", "0.60855836", "0.60855836", "0.60855836", "0.60855836", "0.60725224", "0.60725224", "0.60725224", "0.60725224", "0.60725224", ...
0.8881617
1
`_write` writes the argument to the output stream
_write(string, callback) { this._outputStream.write(string, 'utf8', callback); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function write() {}", "_write() {}", "function write() {\n console.log(\"TODO: Implement write\", arguments);\n }", "async write() { }", "function sc_write(o, p) {\n if (p === undefined) // we assume not given\n\tp = SC_DEFAULT_OUT;\n p.appendJSString(sc_toWriteString(o));\n}", "_write(chunk, e...
[ "0.8183204", "0.8075075", "0.72892493", "0.7100794", "0.6667419", "0.6438245", "0.6416248", "0.64039105", "0.6388292", "0.6336242", "0.62445337", "0.6199856", "0.6146385", "0.60642046", "0.60560083", "0.5989862", "0.5977204", "0.5975036", "0.58930844", "0.5823444", "0.5817204...
0.62531865
11
`_writeQuad` writes the quad to the output stream
_writeQuad(subject, predicate, object, graph, done) { try { // Write the graph's label if it has changed if (!graph.equals(this._graph)) { // Close the previous graph and start the new one this._write((this._subject === null ? '' : this._inDefaultGraph ? '.\n' : '\n}\n') + (DEFAULTGRAPH....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_writeQuadLine(subject, predicate, object, graph, done) {\n // Write the quad without prefixes\n delete this._prefixMatch;\n this._write(this.quadToString(subject, predicate, object, graph), done);\n }", "_writeQuadLine(subject, predicate, object, graph, done) {\n // Write the quad without prefixes\...
[ "0.6742977", "0.66998917", "0.6695412", "0.6441846", "0.6407791", "0.6152779", "0.6068942", "0.6062519", "0.5989188", "0.5889845", "0.5790582", "0.5790582", "0.57722205", "0.5700867", "0.5651225", "0.5635289", "0.5481569", "0.54373354", "0.54068875", "0.5379458", "0.5358802",...
0.6458152
3
`_writeQuadLine` writes the quad to the output stream as a single line
_writeQuadLine(subject, predicate, object, graph, done) { // Write the quad without prefixes delete this._prefixMatch; this._write(this.quadToString(subject, predicate, object, graph), done); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_writeQuadLine(subject, predicate, object, graph, done) {\n // Write the quad without prefixes\n delete this._prefixMatch;\n this._write(this.quadToString(subject, predicate, object, graph), done);\n }", "function drawQuad(x0, y0, x1, y1, x2, y2, x3, y3) {\n\tbeginShape();\n\tvertex(x0, y0);\n\tvertex(...
[ "0.73476803", "0.6427544", "0.6240587", "0.6042886", "0.5955668", "0.59121084", "0.58683985", "0.57443476", "0.56548285", "0.5599204", "0.55749696", "0.5518305", "0.5490521", "0.5490521", "0.54892004", "0.5475685", "0.5460568", "0.5425147", "0.5421434", "0.534017", "0.5297057...
0.7299154
1
`quadToString` serializes a quad as a string
quadToString(subject, predicate, object, graph) { return this._encodeIriOrBlank(subject) + ' ' + this._encodeIriOrBlank(predicate) + ' ' + this._encodeObject(object) + (graph && graph.value ? ' ' + this._encodeIriOrBlank(graph) + ' .\n' : ' .\n'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static serializeQuad(quad) {\n return NQuads.serializeQuadComponents(quad.subject, quad.predicate, quad.object, quad.graph);\n }", "quadsToString(quads) {\n return quads.map(t => {\n return this.quadToString(t.subject, t.predicate, t.object, t.graph);\n }).join('');\n }", "quadsToString(quads) ...
[ "0.7926427", "0.6809547", "0.6789141", "0.677624", "0.67140645", "0.6354525", "0.62712556", "0.6156487", "0.60158753", "0.58807564", "0.5755833", "0.57199895", "0.5657414", "0.5641339", "0.55875814", "0.55875814", "0.55766493", "0.55766493", "0.55691963", "0.55691963", "0.556...
0.63517827
6
`quadsToString` serializes an array of quads as a string
quadsToString(quads) { return quads.map(function (t) { return this.quadToString(t.subject, t.predicate, t.object, t.graph); }, this).join(''); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "quadsToString(quads) {\n return quads.map(t => {\n return this.quadToString(t.subject, t.predicate, t.object, t.graph);\n }).join('');\n }", "static serialize(dataset) {\n if (!Array.isArray(dataset)) {\n dataset = NQuads.legacyDatasetToQuads(dataset);\n }\n const quads = [];\n for (...
[ "0.82984406", "0.73951006", "0.6447799", "0.6445667", "0.6220408", "0.61971426", "0.6192493", "0.6099085", "0.60444385", "0.60247153", "0.598041", "0.5967654", "0.59067476", "0.59067476", "0.59067476", "0.5901273", "0.58669037", "0.5865178", "0.5853155", "0.5853155", "0.58090...
0.83734643
0
`_encodeIriOrBlank` represents an IRI or blank node
_encodeIriOrBlank(entity) { // A blank node or list is represented as-is if (entity.termType !== 'NamedNode') { // If it is a list head, pretty-print it if (this._lists && entity.value in this._lists) entity = this.list(this._lists[entity.value]); return 'id' in entity ? entity.id : '_:' + ent...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_encodeIriOrBlank(entity) {\n // A blank node or list is represented as-is\n if (entity.termType !== 'NamedNode') {\n // If it is a list head, pretty-print it\n if (this._lists && entity.value in this._lists) entity = this.list(this._lists[entity.value]);\n return 'id' in entity ? entity.id : ...
[ "0.81853825", "0.5072316", "0.50633526", "0.5059177", "0.5059177", "0.5059177", "0.50196177", "0.50037473", "0.4947334", "0.49453145", "0.49193433", "0.4888116", "0.4888116", "0.4888116", "0.4888116", "0.48676902", "0.48676902", "0.48600146", "0.48580262", "0.48470163", "0.48...
0.8269435
0
`_encodeLiteral` represents a literal
_encodeLiteral(literal) { // Escape special characters var value = literal.value; if (escape.test(value)) value = value.replace(escapeAll, characterReplacer); // Write the literal, possibly with type or language if (literal.language) return '"' + value + '"@' + literal.language;else if (literal.datatyp...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_encodeLiteral(literal) {\n // Escape special characters\n let value = literal.value;\n if (escape.test(value)) value = value.replace(escapeAll, characterReplacer);\n\n // Write a language-tagged literal\n if (literal.language) return `\"${value}\"@${literal.language}`;\n\n // Write dedicated lit...
[ "0.8342165", "0.67542386", "0.66819316", "0.6612005", "0.6605306", "0.65726125", "0.65726125", "0.6524345", "0.6523714", "0.650859", "0.6458636", "0.6409472", "0.63836247", "0.6359458", "0.6331905", "0.622098", "0.622098", "0.622098", "0.622098", "0.622098", "0.622098", "0....
0.86721295
0
`_encodePredicate` represents a predicate
_encodePredicate(predicate) { return predicate.value === rdf.type ? 'a' : this._encodeIriOrBlank(predicate); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Predicate(predicate){\n this.predicate = predicate;\n}", "function Predicate() {}", "function Predicate() {}", "function Predicate() {}", "function Predicate() { }", "function Predicate() { }", "function Predicate () {}", "function Predicate(){}", "static _buildPredicate(codeObjects: Code...
[ "0.6735475", "0.6224234", "0.6224234", "0.6224234", "0.6214251", "0.6214251", "0.61629593", "0.6130103", "0.5789227", "0.56207335", "0.56207335", "0.55543697", "0.55047613", "0.5438437", "0.5294274", "0.5268189", "0.52427036", "0.5158193", "0.5076381", "0.5076381", "0.5062684...
0.8634154
1
`_encodeObject` represents an object
_encodeObject(object) { return object.termType === 'Literal' ? this._encodeLiteral(object) : this._encodeIriOrBlank(object); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_encodeObject(object) {\n switch (object.termType) {\n case 'Quad':\n return this._encodeQuad(object);\n case 'Literal':\n return this._encodeLiteral(object);\n default:\n return this._encodeIriOrBlank(object);\n }\n }", "encode(obj) {\n logger_1.Logger.log.debug...
[ "0.8073963", "0.75727236", "0.7291708", "0.72410536", "0.7151698", "0.69085026", "0.68160945", "0.67378604", "0.6672687", "0.6665129", "0.656075", "0.6473267", "0.64490676", "0.64150107", "0.64042133", "0.63994694", "0.637056", "0.6346523", "0.6335026", "0.6335026", "0.624471...
0.78022194
1
`_blockedWrite` replaces `_write` after the writer has been closed
_blockedWrite() { throw new Error('Cannot write because the writer has been closed.'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "writeReliableBlocked(buf, callback) {\n if (this.isInBlockMode) {\n this.pendingPackets.push([this.writeReliableBlocked, ...arguments]);\n return;\n }\n\n this.isInBlockMode = true;\n\n let packetId = this.getNextPacketId();\n return this._writeReliableBlocked(buf, packetId, () => {\n ...
[ "0.6157623", "0.6087667", "0.60306674", "0.5962328", "0.58707047", "0.5699959", "0.5699959", "0.5699959", "0.5699959", "0.5643663", "0.5617714", "0.56175625", "0.5603267", "0.56029916", "0.55869406", "0.5544802", "0.5518326", "0.5513905", "0.55091", "0.5499715", "0.5478203", ...
0.8742049
1
`addQuad` adds the quad to the output stream
addQuad(subject, predicate, object, graph, done) { // The quad was given as an object, so shift parameters if (object === undefined) this._writeQuad(subject.subject, subject.predicate, subject.object, subject.graph, predicate); // The optional `graph` parameter was not provided else if (typeof graph === 'fu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "add(quad) {\n this.addQuad(quad);\n return this;\n }", "_writeQuadLine(subject, predicate, object, graph, done) {\n // Write the quad without prefixes\n delete this._prefixMatch;\n this._write(this.quadToString(subject, predicate, object, graph), done);\n }", "function drawQuad(x0, y0, x1, y1,...
[ "0.6854527", "0.6372305", "0.6344536", "0.6328935", "0.63107824", "0.6273184", "0.6273184", "0.61980414", "0.61980414", "0.61036915", "0.6070449", "0.5837297", "0.5822405", "0.58145463", "0.5749768", "0.57456", "0.5729848", "0.56734127", "0.56734127", "0.5627395", "0.55812204...
0.6370345
2
`addQuads` adds the quads to the output stream
addQuads(quads) { for (var i = 0; i < quads.length; i++) this.addQuad(quads[i]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addQuads(quads) {\n for (let i = 0; i < quads.length; i++) this.addQuad(quads[i]);\n }", "addQuads(quads) {\n for (let i = 0; i < quads.length; i++) this.addQuad(quads[i]);\n }", "function\nadd_quats(q1, q2)\n{\n var t1 = [], t2 = [], t3 = [], tf = [];\n var dest = [];\n \n t1[0] = q1[0];\n...
[ "0.7097795", "0.7097795", "0.5577731", "0.5559504", "0.553324", "0.51060176", "0.49964672", "0.49820822", "0.48770246", "0.4757803", "0.4675344", "0.45776016", "0.45752388", "0.45732018", "0.4560964", "0.45398518", "0.44946808", "0.44929397", "0.44756797", "0.4472078", "0.446...
0.72042555
0
`addPrefix` adds the prefix to the output stream
addPrefix(prefix, iri, done) { var prefixes = {}; prefixes[prefix] = iri; this.addPrefixes(prefixes, done); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addPrefixes(prefixes, done) {\n // Ignore prefixes if not supported by the serialization\n if (!this._prefixIRIs) return done && done();\n\n // Write all new prefixes\n let hasPrefixes = false;\n for (let prefix in prefixes) {\n let iri = prefixes[prefix];\n if (typeof iri !== 'string') ir...
[ "0.6904287", "0.68370813", "0.652907", "0.652008", "0.6514411", "0.64298934", "0.63055027", "0.6247931", "0.61399084", "0.60075843", "0.59352565", "0.589762", "0.5857347", "0.5844596", "0.5843472", "0.5766838", "0.5665036", "0.5665036", "0.5665036", "0.5665036", "0.5629178", ...
0.66382474
2
`addPrefixes` adds the prefixes to the output stream
addPrefixes(prefixes, done) { var prefixIRIs = this._prefixIRIs, hasPrefixes = false; for (var prefix in prefixes) { var iri = prefixes[prefix]; if (typeof iri !== 'string') iri = iri.value; hasPrefixes = true; // Finish a possible pending quad if (this._subject !== null) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addPrefixes(prefixes, done) {\n // Ignore prefixes if not supported by the serialization\n if (!this._prefixIRIs) return done && done();\n\n // Write all new prefixes\n let hasPrefixes = false;\n for (let prefix in prefixes) {\n let iri = prefixes[prefix];\n if (typeof iri !== 'string') ir...
[ "0.7826349", "0.6131948", "0.6096738", "0.5979926", "0.5664365", "0.56382483", "0.5520945", "0.54973775", "0.5461365", "0.54425406", "0.5341552", "0.5294495", "0.52886444", "0.5230185", "0.5194915", "0.5056437", "0.50149125", "0.49725935", "0.49493915", "0.486058", "0.4845417...
0.7556916
1
`blank` creates a blank node with the given content
blank(predicate, object) { var children = predicate, child, length; // Empty blank node if (predicate === undefined) children = []; // Blank node passed as blank(Term("predicate"), Term("object")) else if (predicate.termType) children = [{ predicate: predicate, object: objec...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_blank() {\n return this._blankNode('b' + blankNodeCount++);\n }", "function blankNode(name) {\n return new BlankNode(name || `n3-${_blankNodeCounter++}`);\n}", "function blank(name) {\n if (typeof name === 'string') { // Only use name if a name is given\n if (name.startsWith('e_')) return Parser...
[ "0.7585768", "0.756001", "0.674181", "0.65487283", "0.6415995", "0.6373993", "0.6373993", "0.6373993", "0.6373993", "0.6373993", "0.6354597", "0.6354597", "0.6307875", "0.6307875", "0.6307875", "0.6307875", "0.6252168", "0.62339115", "0.61761564", "0.6089546", "0.6088912", ...
0.5701159
47
`list` creates a list node with the given content
list(elements) { var length = elements && elements.length || 0, contents = new Array(length); for (var i = 0; i < length; i++) contents[i] = this._encodeObject(elements[i]); return new SerializedTerm('(' + contents.join(' ') + ')'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ListList(props) {\n var children = props.children,\n className = props.className,\n content = props.content;\n\n\n var rest = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__lib__[\"b\" /* getUnhandledProps */])(ListList, props);\n var ElementType = __webpack_require__.i(__WEBPACK_IMPORTED...
[ "0.6976647", "0.6971993", "0.6970803", "0.6970803", "0.69681287", "0.69681287", "0.68950605", "0.68350303", "0.6823442", "0.6791582", "0.67698914", "0.6653731", "0.66393244", "0.663606", "0.6630112", "0.66001004", "0.6599037", "0.6599037", "0.6599037", "0.6599037", "0.6571193...
0.0
-1
`end` signals the end of the output stream
end(done) { // Finish a possible pending quad if (this._subject !== null) { this._write(this._inDefaultGraph ? '.\n' : '\n}\n'); this._subject = null; } // Disallow further writing this._write = this._blockedWrite; // Try to end the underlying stream, ensuring done is called exactly one t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function emitEnd() {\n eventEmitter.emit('end');\n}", "end() { }", "end() {\n this.log('end');\n }", "get end() {}", "end() {\n }", "end() {\n }", "function emitFinish(stream) {\n var state = stream._writableState;\n if (!state.ended) {\n state.ended = true;\n stream.emit('fini...
[ "0.75281835", "0.74781394", "0.73695546", "0.7254415", "0.7204809", "0.7204809", "0.7022641", "0.69844663", "0.69550526", "0.69282514", "0.68823117", "0.677815", "0.674884", "0.6744284", "0.67239493", "0.6695503", "0.66688865", "0.665353", "0.66305965", "0.66144687", "0.66120...
0.69848675
7
v8 likes predictible objects
function Item(fun, array) { this.fun = fun; this.array = array; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compareLike(a,b){\n var al = a.idLikesProp.length;\n var bl = b.idLikesProp.length;\n if(al > bl) return -1;\n if(bl > al) return 1;\n return 0;\n}", "function lookAround() {\n var objectDescription = \"\"\n tj.see().then(function(objects) {\n objects.forEach(function(each) {\n ...
[ "0.527866", "0.52612406", "0.51951283", "0.518796", "0.51302594", "0.5044646", "0.48934332", "0.4857401", "0.484017", "0.48302925", "0.482028", "0.4812441", "0.4808473", "0.47852293", "0.47828078", "0.47574478", "0.47493434", "0.4739314", "0.47239366", "0.4703992", "0.4703992...
0.0
-1
Take a potentially misbehaving resolver function and make sure onFulfilled and onRejected are only called once. Makes no guarantees about asynchrony.
function doResolve(fn, onFulfilled, onRejected) { var done = false; try { fn(function (value) { if (done) return; done = true; onFulfilled(value); }, function (reason) { if (done) return; done = true; onRejected(reason); }) } catch (ex) { if (done) return; done = true; on...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function doResolve(fn, onFulfilled, onRejected) {\n var done = false;\n try {\n fn(function (value) {\n if (done) return;\n done = true;\n onFulfilled(value);\n }, function (reason) {\n if (done) return;\n done = true;\n onRejected(reaso...
[ "0.7080121", "0.7073552", "0.7044052", "0.7041774", "0.7041774", "0.7041774", "0.70340896", "0.7016656", "0.6961863", "0.6961863", "0.6961863", "0.6961863", "0.68096614", "0.6281818", "0.61684054", "0.60251856", "0.6018783", "0.6018783", "0.6018783", "0.6018783", "0.6018783",...
0.70332444
10
If obj.hasOwnProperty has been overridden, then calling obj.hasOwnProperty(prop) will break. See:
function hasOwnProperty(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop);}", "function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop);}", "function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop);}", "function hasOwnProperty(obj,pr...
[ "0.7923444", "0.7923444", "0.7923444", "0.7923444", "0.7923444", "0.7923444", "0.7923444", "0.7923444", "0.7919001", "0.7919001", "0.7919001", "0.7884411", "0.78761464", "0.77821815", "0.77511156", "0.77511156", "0.77511156", "0.7742199", "0.7742199", "0.7742199", "0.7742199"...
0.0
-1
Handle the closing of the last tag.
onCloseTag() { const poppedTag = this.activeTagStack.pop(); // If we were converting a tag to a string, and the tag was not self-closing, close it here. if (poppedTag.childrenStringEmitClosingTag) { poppedTag.childrenStringTags.push(poppedTag.childrenStringEmitClosingTag); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function closeTag(tag) {\n return '</' + tag + '>';\n }", "onTagClose(event) {\n const { previous: target } = event;\n const root = this.getCurrentRoot();\n if (target.unique !== root.node) {\n return;\n }\n this.stack.pop();\n }", "function appropriateEndTa...
[ "0.71558595", "0.7118087", "0.70695776", "0.704699", "0.704699", "0.6819395", "0.67596865", "0.67067564", "0.6696709", "0.6685996", "0.6620953", "0.66123384", "0.6568206", "0.65461814", "0.6529822", "0.6460235", "0.64520454", "0.64520454", "0.644868", "0.644868", "0.644868", ...
0.55465186
91
if it's past the high water mark, we can push in some more. Also, if we have no data yet, we can stand some more bytes. This is to work around cases where hwm=0, such as the repl. Also, if the push() triggered a readable event, and the user called read(largeNumber) such that needReadable was set, then we ought to push ...
function needMoreData(state) { return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function push(){if(pushes>PUSHCOUNT)return;if(pushes++===PUSHCOUNT){console.error(\" push(EOF)\");return r.push(null)}console.error(\" push #%d\",pushes);r.push(new Buffer(PUSHSIZE))&&setTimeout(push)}", "tryPush() {\n\t\t// Get the total length of what would be pushed.\n\t\tconst amountToPush = Math.min(thi...
[ "0.6566027", "0.64054066", "0.63931787", "0.6381439", "0.63512605", "0.63512605", "0.624256", "0.62135315", "0.6171126", "0.61653805", "0.61653805", "0.61653805", "0.61653805", "0.61653805", "0.61653805", "0.61653805", "0.61653805", "0.61653805", "0.61653805", "0.61653805", "...
0.0
-1