Research Article

Persian Named Entity Recognition by Gray Wolf Optimization Algorithm

Algorithm 1

Segment extraction.
input: : A Telegram post
where is a word in the post
: gray wolf vector
output: : set of segments for a post extracted from GWV
(1)
(2)
(3)
(4)for i = 1:len(GWV) do
(5)if GWV[i] ! = −1 then
(6)if NewSegment GWV[i − 1] = = −1 then
(7)
(8)
(9)if GWV[i] = = 1 i = = len(GWV) then
(10)
(11)
(12)
(13)else if GWV[i + 1] = = −1 then
(14)
(15)
(16)
(17)
(18)else
(19)
(20)
(21)if DetectSegment then
(22)
(23)add to
(24)
(25)
(26)return