Skip to content

Commit 433e579

Browse files
docs(identify-marked-area): add header coomments
1 parent f7cb905 commit 433e579

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

src/identify-marked-area.js

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,47 @@
1+
// wink-nlp
2+
//
3+
// Copyright (C) GRAYPE Systems Private Limited
4+
//
5+
// This file is part of “wink-nlp”.
6+
//
7+
// Permission is hereby granted, free of charge, to any
8+
// person obtaining a copy of this software and
9+
// associated documentation files (the "Software"), to
10+
// deal in the Software without restriction, including
11+
// without limitation the rights to use, copy, modify,
12+
// merge, publish, distribute, sublicense, and/or sell
13+
// copies of the Software, and to permit persons to
14+
// whom the Software is furnished to do so, subject to
15+
// the following conditions:
16+
//
17+
// The above copyright notice and this permission notice
18+
// shall be included in all copies or substantial
19+
// portions of the Software.
20+
//
21+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
22+
// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
23+
// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
24+
// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
25+
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
26+
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
27+
// CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
28+
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29+
// DEALINGS IN THE SOFTWARE.
30+
31+
//
32+
33+
// ## identifyMarkedArea
34+
/**
35+
*
36+
* Identifies the area to be marked within the detected entitity's span, which is
37+
* extracted as the value.
38+
*
39+
* @param {number[]} mark contains the target area to be extracted from within
40+
* the entitity's span, defined as `[ firstIndex, lastIndex ]`.
41+
* @param {number} length of the entity's span.
42+
* @return {number[]} array containing the modifiers for the orginal span.
43+
* @private
44+
*/
145
const identifyMarkedArea = function ( mark, length ) {
246
// Length Minus 1.
347
const lm1 = length - 1;

0 commit comments

Comments
 (0)