I nd o ne s ia n J o urna l o f   E lect rica l En g ineering   a nd   Co m pu t er   Science   Vo l.   23 ,   No .   2 A u g u s t   2 0 2 1 ,   p p .   1 2 0 0 ~ 1 2 1 1   I SS N:  2 5 0 2 - 4 7 5 2 ,   DOI : 1 0 . 1 1 5 9 1 /ijeecs.v 23 .i 2 . pp 1 2 0 0 - 1 2 1 1          1200       J o ur na l ho m ep a g e h ttp : //ij ee cs.ia esco r e. co m   To wa rds dev elo ping  a po cket  thera pist:  a n i ntelligen a da ptive  psy cho lo g ica l suppo rt  cha tbot  ag a inst men tal hea lth   diso rders  in a pa ndemic  sit ua tion       I ntis s a Sa lhi ,   K a m a l El   G uem m a t ,   M o ha mm ed  Q ba do u ,   K ha lifa   M a ns o uri   L a b o r a t o r y   o f   S i g n a l s ,   d i s t r i b u t e d   s y s t e m s ,   a n d   a r t i f i c ia l   i n t e l l i g e n c e ,   E N S E T ,   H a s sa n   I I   U n i v e r s i t y   o f   C a s a b la n c a ,   M o r o c c o       Art icle  I nfo     AB S T RAC T   A r ticle  his to r y:   R ec eiv ed   Ap r   2 9 ,   2 0 2 1   R ev is ed   J u l 8 ,   2 0 2 1   Acc ep ted   J u l 1 4 ,   2 0 2 1       No wa d a y with   COV ID - 19   o n g o in g   e p i d e m ic   o u tb re a k ,   c o n tain m e n fo r   we e k wa o n e   o th e   m o st  e ffe c ti v e   m e a su re a d o p ted   to   d e a l   with   th e   sp re a d   o t h e   v ir u u n ti l   a   v a c c in e   c o u l d   b e   e fficie n t .   Ov e t h a p e rio d ,   in c re a se d   a n x iet y ,   d e p re ss io n ,   s u icid e   a tt e m p ts,   a n d   p o st - tra u m a ti c   stre ss   d iso rd e a re   a c c u m u late d .   S e v e ra stu d ies   re fe rre d   to   t h e   n e e d   o u si n g   c h a tb o ts,   wh ich   re c o g n ize h u m a n   e m o ti o n i n   su c h   p a n d e m i c   c o n tex ts .   M o re   re c e n tl y ,   n u m e ro u re se a rc h   p a p e rs  imp ro v e d   th e   a b il i ty   o a rti ficia in telli g e n c e   m e th o d t o   re c o g n ize   h u m a n   e m o ti o n .   Ho we v e r,   t h e y   a re   stil l   li m it e d .   T h e   a im  o f   t h is  p a p e i th e   d e v e lo p m e n o a   c h a t b o t   a g a in st  t h e   d istu r b in g   p sy c h ic   c o n se q u e n c e o th e   p a n d e m ic,  tak in g   h u m a n   e m o ti o n   re c o g n it i o n   in to   a c c o u n t.   Th e   o b jec is  to   h e lp   p e o p le;  e sp e c ially   stu d e n ts;   su ffe rin g   fro m   m e n tal   d iso rd e rs,  b y   p ro g re ss iv e ly   u n d e rsta n d in g   t h e   re a so n s   b e h in d   t h e m .   T h is  i n n o v a ti v e   c h a tb o wa d e v e l o p e d   b y   u sin g   th e   n a t u ra l   lan g u a g e   p r o c e ss in g   m o d e o d e e p   lea rn in g .   An   a d v a n c e d   m o d e o d e e p   lea rn in g   h a s   b e e n   e lab o ra ted   t h e   i n ten ti o n   fo r   p e o p le,   a n d   th a t   to   h e lp   t h e m   t o   re g u late   t h e ir  m o o d   a n d   to   re d u c e   d isto rt io n   o f   n e g a ti v e   t h o u g h ts,  th a wh y   a   c o ll e c ti o n   o a   n e d a tab a se   wa d o n e .   T h e   s e q u e n c e - to - s e q u e n c e   m o d e e n c o d e a n d   d e c o d e r   c o n sist   o f   Lo n g   sh o rt - term   m e m o ry   c e ll s,   a n d   it   is   d e fin e d   wit h   t h e   b i - d irec ti o n a d y n a m ic rec u rre n n e u ra n e two r k   p a c k e ts.    K ey w o r d s :   C h atb o t   C OVI D - 19   L STM   NL P   Ps y ch ic  d is o r d er s   R NN   Seq u en ce - to - s eq u en ce   T h is i a n   o p e n   a c c e ss   a rticle   u n d e r th e   CC B Y - SA   li c e n se .     C o r r e s p o nd ing   A uth o r :   I n tis s ar   Salh i   L ab o r ato r y   o f   Sig n als,  d is tr ib u ted   s y s tem s ,   an d   ar tific ial  in tellig en ce   E NSET ,   Un iv er s ity   Hass an   I I   Un iv er s ity   o f   C asab lan ca   E NSET M,   B P 1 5 9   B d   Hass an   I I   Mo h am m ed ia  2 8 0 0 0 ,   Mo r o cc o   E m ail:  s alh i9 4 7 7 @ g m ail. co m       1.   I NT RO D UCT I O N   I n   a   p an d em ic  s itu atio n ,   th p s y ch o lo g ical  r ea ctio n s   o f   th e   p o p u latio n   ar e   an   ess en tial  f ac to r   o f   th e   v ir u s   s p r ea d   [ 1 ] .   C h an g es  an d   co u n ter m ea s u r es  ar tak en   to   co n tr o it  led   to   th ap p ea r an ce   o f   em o tio n al   d is tr ess   an d /o r   m en tal  h ea lth   p r o b lem s   b o th   d u r in g   an d   a f t er   th at  p an d em ic  [ 2 ] .   Desp ite  th is   f ac t,  r eso u r ce s   ar n o g en er ally   s u f f icien f o r   m an ag in g   a n d   m itig atin g   th e   im p ac th at  p an d em ics  m ig h o th er wis ca u s to   th m en tal  h ea lth   an d   wellb ein g   o f   th p o p u latio n   [ 3 ] .   W h ile  th is   m ay   b e   u n d er s to o d   d u r i n g   th ac u te  s tag es   o f   a   p an d em ic  wh e n   h ea lt h ca r s y s tem s   p r io r itize  test in g ,   t r an s m is s io n   r ed u ctio n ,   as  wel as  cr itical  p atien ca r e,   th p s y ch o lo g ical  an d   p s y ch o lo g ical  r e q u ir em e n ts ,   ca n n o b n eg lecte d   at  an y   p h ase  in   p an d em ic  m an ag em en [ 4 ] .   Me n tal  He al th   s tan d s   f o r   c o g n itiv e,   em o ti o n al,   an d   b e h av io r al  wellb ein g   [ 5 ] ,   [ 6 ] .   I is   ab o u t   h o p e o p le  a r th in k in g ,   f ee li n g ,   a n d   b eh av i n g .   I is   th e   wa y   p eo p le  th i n k ,   f ee l,  a n d   b eh a v e.   As  r ep o r ted   b y   th wo r ld   h ea lth   o r g an izatio n   ( W HO) ,   th e"   m en tal   h ea lth "   t er m   m a y   b e   u s ed   s o m etim es  a s   ter m   to   i n d icate   th ab s en ce   o f   m en tal  d is o r d er   [ 7 ] .     Evaluation Warning : The document was created with Spire.PDF for Python.
I n d o n esian   J   E lec  E n g   &   C o m p   Sci     I SS N:  2502 - 4 7 5 2       To w a r d s   d ev elo p in g   a   p o ck et  t h era p is t:   a n   in tellig en a d a p tive  p s yc h o lo g ica l su p p o r t     ( I n tis s a r   S a lh i )   1201   R ec en tly ,   th im p o r tan r o le  o f   m en tal  h ea lth   in   th e   ac h iev e m en o f   g lo b al   d ev elo p m en tal  ch allen g es   h as  b ee n   in cr ea s in g ly   r ec o g n i ze d ,   as  illu s tr ated   b y   t h in cl u s io n   o f   m en t al   h ea lth   i n   th e   g o als  o f   s u s tain ab le  d ev elo p m e n [ 8 ] .   On o f   th m ajo r   ca u s es  o f   d is ab ilit ies   c an   b d ep r ess io n   [ 9 ] ,   [ 1 0 ] .   S u icid r em ain s   th s ec o n d   ca u s o f   d ea th   am o n g   1 5 to   2 9 - y ea r   ag e - o ld s   [ 1 1 ] ,   [ 1 2 ] .   Peo p le  with   s er io u s   m en tal  h ea lth   co n d itio n s   ar d y in g   p r e m atu r ely   b y   u p   t o   two   d ec ad es b ec a u s o f   p r ev en tab le  p h y s ical  im p air m en t [ 1 3 ] .   At  th tim o f   p a n d em ic,   as  with   C OVI D - 1 9 ,   f ea r ,   an x iety ,   an d   s tr ess   m ay   b co n s id er ed   as   n o r m al  r ea ctio n s   to war d s   t h p er ce iv ed   an d   ac tu al  th r ea ts .   W h en   we  ar c o n f r o n ted   with   th u n ce r tain ty   a n d   s tr u g g les  o f   th u n f am iliar   [ 1 4 ] .   Asi d f r o m   f ea r   to   co n tr ac th is   v ir u s ,   th er ar also   d r am atic  ch an g es  in   o u r   d aily   liv es  [ 1 5 ] ,   d u to   th li m ited   m o b ilit y   r eq u ir e d   to   s u s tain   ef f o r ts   aim ed   to   co n tain   an d   s lo wd o wn   th at  v ir u s ' s   s p r ea d .   Dea lin g   with   th ese  n ew  r ea liti es  in clu d in g   h o m e - s ch o o lin g   f o r   c h ild r en ,   te lewo r k ,   m o m e n tar y   u n em p lo y m en t,   an d   th e   lim ite d   co n tact  with   f r ien d s ,   o th e r   f am ily   m em b er s ,   a n d   co lleag u es;  we  m u s en s u r th at  o u r   m e n tal  an d   p h y s ical  h ea lth ,   ar well  ca r ed   f o r .   On o f   th e   m ain   tech n o lo g i ca s o lu tio n s   to   th e   lack   o f   s taf f   in   th e   f ield   o f   m en ta h ea lth   is     ch atb o ts   [ 1 6 ] - [ 1 8 ] ,   co m m o n l y   k n o wn   as  co n v er s atio n al  a g en ts ,   co n v er s atio n al  r o b o ts ,   o r   ch atter b o ts   [ 1 9 ] .   Su ch   s y s tem s   ca n   s im u late   h u m an   c o n v er s atio n al   s k ills   v ia  n atu r al  la n g u a g [ 2 0 ] .   At  t h ac u te  s tag o f   C OVI D - 19 ,   h ea lth ca r s y s tem s   p r io r itized   test in g ,   tr an s m is s io n   r ed u ctio n ,   an d   cr itical  p atien ca r e.   Su ch   co n v er s atio n al  ag e n ts   ca n   b v alu ab le  to o ls ,   as  th ey   ca n   s u b s titu te  th er ap is an d   ca n   talk   to   p eo p le  an d   p r o v id e   s o m r ea s s u r an ce .   N u m er o u s   t r ials   h av b ee n   ca r r ied   o u to   d esig n   a n d   im p lem en co n v er s atio n al   ag en ts   to   s u p p o r t in d iv id u als in   m an y   ar ea s   o f   d aily   life ,   in cl u d in g   h ea lth ca r e,   ac ad em ia,   c o m m er ce ,   f in a n ce s ,   in d u s tr y ,   an d   law  [ 2 1 ] - [ 2 4 ] .   T h ey   ca n   p r o ce s s   u s er   in p u ts   th r o u g h   n atu r al  lan g u a g p r o ce s s in g   to o ls ,   th en   m atch   th ese  in p u ts   with   th in ten an d   g e n er ate  o u t p u ts   [ 2 5 ] .   T h ey   ar p r o g r am m e d   s o   th at  th ey   ca n   in ter ac t   with   u s er s   as  r ea p er s o n   [ 2 6 ]   an d   h a v th ca p ac ity   t o   f o ll o b o th   co n tex an d   wo r d   lis ts .   Fu r th er m o r e,   w e   ca n   class if y   th em   u n d e r   th r ee   d if f er e n class es,  d ee p   l ea r n in g ,   en d - to - en d ,   a n d   s e q u en ce - to - s eq u en ce     ch atb o ts   [ 2 7 ] - [ 2 9 ] .     T h m ed ical  f ield   is   an   ar ea   w h er ch atb o ts   ar m o r an d   m o r ad o p ted   as  to o to   ea s i n f o r m atio n   ac ce s s   b y   th p atien an d   to   r e d u ce   th wo r k lo ad   o n   th e   clin ician .   p s y ch o th e r ap y   h as  b ee n   th f ir s d is cip lin u s in g   co n v er s atio n al  ag en ts .   I t   s tar ted   in   1 9 6 4   with   E L I Z wh o   was  ca p ab le  to   s im u late  a   p s y ch o th er a p is b y   r ef o r m u latin g   alm o s all  th ass er tio n s   o f   p atien in to   q u esti o n s   b y   ask in g   h im .   T h is   was  d o n b ased   o n   n atu r al  lan g u a g p r o ce s s in g   [ 3 0 ] .   Ho wev er ,   th ch atb o h a d   s o m lim itatio n s ,   f o r   in s tan ce ,   it  was  in ca p ab le  o f   an s wer in g   ac c o r d in g   to   th e   co n tex t,   an d   it  was  u n ab le   to   h an d le  t h lo s q u esti o n s   in   an y   m ea n i n g f u way .   T h is   is   wh y   h co u ld n ' p ass   th T u r in g   test   [ 3 1 ] .   B y   th y ea r   1 9 7 2 ,   a n o th er   c h atb o k n o wn   as  Par r y was   p r o p o s ed   b y   a   r esear c h er   i n   th Stan f o r d   la b s   th at   wer ab le  o f   s im u latin g   an   in d i v id u al  with   Par a n o iac   Sch izo p h r en ia.   Par r y   s u cc ess f u lly   p ass ed   th e   T u r i n g   test   a n d   h ad   s ev er al  c o n v e r s atio n s   w ith   E L I Z [ 3 2 ] .   I n   r ec en y ea r s ,   as  m ac h i n e   lea r n in g   an d   ar tific ial  in tellig en ce   ap p r o ac h es  ar e   g r a d u ally   b ein g   ad o p ted   in   d if f er en ap p licatio n   ar ea s ,   ad v an ce d   d ialo g u g e n er atio n   a n d   m an ag e m en m eth o d s   ar in cr ea s in g ly   u s in g   m ac h in lear n in g   an d   d ee p   le ar n in g   tech n iq u es.  lar g n u m b er   o f   c o m m e r cial   ch atb o t   a p p s ,   o f f er ed   as  web   o r   m o b ile - b ased   s o lu tio n s ,   wer d e v elo p ed   as  a   way   to   i n ter ac d ir ec tly   with   p atie n ts .   So m ex am p les  o f   h ea lth ca r ch atb o ts   in clu d O n eRem is s io n 1 ,   wh ich   h as  b ee n   d esig n ed   t o   ass is ca n ce r   s u r v iv o r s ,   th B ab y l o n   Hea lth ,   wh o   is   s y m p to m - ch ec k in g   to o l,  an d   W y s [ 3 3 ] ,   w h ich   is   m en tal  h ea lth   ch atb o th at  in ter ac ts   with   th u s er   to   h el p   h im /h er   r ec o g n ize  s ig n s   o f   an x iety   an d   d ep r ess io n   [ 3 4 ] ,   [ 3 5 ] .       2.   T H E   P RO P O SE M E T H O D   T h d esig n   o f   co n v e r s atio n al  ag en ts   r eq u ir es  p er s o n aliza t io n   to   s u it  th ap p licatio n 's  co n tex t.  T h er ar s p ec if ic  r eq u ir em en ts   wh e n   wo r k in g   o n   ch at b o s o lu tio n s .   T o   d eliv er   tech n o lo g y   th at   p r o v id es  s er v ice   m ee tin g   u s er   n ee d s ,   o n m u s co n s id er   th u s er   d em o g r ap h y ,   d o m ain ,   in ter ac tio n   d ata  an d   d ialo g u e     s tr u ctu r [ 3 6 ] .   T o   im p r o v e   th e   p s y ch ic   co n d itio n   o f   i n d iv id u als  in   th C OVI D - 19   s ce n ar io ,   th c h atb o t   is   h er to   im p r o v th p s y ch ic  s tate  an d   th u s   m u s ad ap its elf   to   ea ch   p er s o n   b ased   o n   th p r e v io u s ly   m en tio n ed   f ea tu r es.  L ately ,   ar tific ial  in tellig en ce   ( AI )   h as  m ad s ig n if i ca n p r o g r ess   in   m ed ical  f ield s ,   n o tab ly   af ter   th e   r is o f   n eu r o n al  n etwo r k s   a n d   d ee p   lear n in g   [ 3 7 ] .   I n   th is   s ec tio n ,   we  ar g o in g   th s u g g e s co n v er s atio n al   ag en t a r ch itectu r e ,   d ef i n an d   ex p lain   its   co m p o n en ts ,   o n b y   o n i n   d etail.   T h is   r esear ch   s tu d y   in tr o d u c es  th er ap is ch atb o with in   C OVI D - 19 ,   th at  s h o u ld   s u p p o r p eo p le   s u f f er in g   f r o m   m en tal  d is o r d e r s   to   er ad icate   n eg ativ e   th o u g h ts   af f ec tin g   th eir   m en tal   h ea l th .   T h is   c h atb o t   h as  b ee n   im p lem en ted   with   s eq u en ce - by - s eq u e n ce   a r ch it e ctu r with   n atu r al  la n g u a g e   p r o ce s s in g .   I is   em o tio n al  an d   ad a p tiv e.   T h u s ,   ca p ab le  o f   em p ath y   an d   u n e x p ec ted   ev en ts .   I n   th is   p ap er ,   we  im p lem en ted   th er ap is ch atb o as  to o to   ass is h ea lth   ca r s taf f   in   th C OVI D - 1 9   p an d em ic  s itu atio n .   T h is   s o lu tio n   is   b ased   o n   r ec u r s iv n eu r al  n etwo r k s .   T h p ap er   h as  b ee n   s tr u ctu r ed T h f ir s s ec tio n   is   cr itical  liter atu r o v er v iew,   wh ile  in   th e   s ec o n d   s ec tio n   t h m ate r ials   an d   m eth o d s   wer e   p r esen ted   th at   h a v u s ed   to   g en er ate   Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 5 0 2 - 4 7 5 2   I n d o n esian   J   E lec  E n g   &   C o m p   Sci,   Vo l.  23 ,   No .   2 Au g u s t 2 0 2 1 1 2 0 0   -   1 2 1 1   1202   th d ata  s et,   to   p r o ce s s   an d   tr ain   i t.  T h th ir d   s ec tio n   is   d ed icate d   to   th im p lem en tat io n   o f   th e   ch atb o t,   r esu lts ,   an d   d is cu s s io n ,   an d   f in ally   to   co n clu d an d   ev o k s o m r ec o m m e n d atio n s   f o r   f u tu r s tu d ies.     2 . 1 .     T he  new  a pp ro a ch  o f   ch a t bo t   ba s ed  o n dee p lea rning   T h is   p ap er   o f f er s   ch atb o th at  p r o v id es  ch at  s er v ice  f o r   p s y ch iatr ic  m o n ito r in g .   I c o llects  an d   s u m m ar izes  d ialo g u es   with   te x tu al  d ata   to   r ec o g n ize   th e   u s er ' s   f ee lin g s .   B ased   o n   th is   d a ta,   th s er v ice' s   aim   co n s is ts   o f   d ev elo p in g   p er s o n alize d   ch at  th at  em o tio n ally   co n v ey s   th u s er   th r o u g h   t ex an d   v o ice.   T o   ac h iev th is   g o al,   th m eth o d o lo g y   ad o p ted   is   to   f ir s u n d e r s tan d   th e   co n te x o f   th e   co n v er s atio n ,   th e n   t h em o tio n al  r ec o g n itio n ,   a n d   f i n ally   th g en er atio n   o f   ca n d i d ate  r esp o n s es  ad ap ted   to   th e   p atien t' s   s itu atio n .   Sectio n   3 . 2   d escr ib es th p r o p o s ed   ar ch itectu r o f   th p s y ch i atr ic  ch atb o t.       2 . 2 .     T he  pro po s ed  t ec hn ica l a rc hite ct ure   T h is   p ar p r o v id es  th tec h n i ca ar ch itectu r o f   th c h atb o b ased   o n   d ee p   lea r n in g .   I co n s is ts   o f   th r ee   m ajo r   c o m p o n en ts   th at  a r e:  th n atu r al  lan g u ag e   u n d er s tan d in g   u n it,  t h d ialo g u m a n ag em en u n it,  an d   th n atu r al  la n g u a g g e n er ati n g   u n it;  wh ich   will   b e   ex p lai n ed   in   d etails  in   th n ex s ec t io n .   Fig u r e   1   s h o ws   th s eq u en cin g   o f   t h o s th r ee   u n its .             Fig u r 1 .   Dee p   lear n in g - b ased   p s y ch iatr ic  ch atb o t       L et's  tak an   illu s tr atio n   to   ex p lain   th wa y   o u r   ch at b o t   wo r k s .   On ce   t h u s er   p u ts   q u er y   o r   q u est io n   to   th ch at b o t ,   th e   c h atb o tak es  c h ar g e   o f   it,   th e n   th n atu r al  lan g u ag e   p r o ce s s in g   u n it  ( NL P)   is   ac tiv ated .   I p ic k s   u p   th r e q u est  an d   s p lits   it  in to   u n d er s tan d ab le  elem e n ts   b ein g   t h k e y wo r d s   o n   wh ich   it   will  f o cu s .   Af ter war d ,   h u s es  th n atu r al  l a n g u a g u n d er s ta n d in g   u n it   ( NL U)   t o   co m p ar e   th q u e r y   to   s im ilar   q u er ies  m ad e   in   R ed d it;  wh ich   is   c o m m u n ity   web s ite  f o r   s o cial  n ews  in   wh ich   p eo p le  ca n   ask   q u esti o n s   a n d   g et  an s wer s an d   tr ies  to   u n d er s tan d   wh at  t h u s er   is   ask in g   f o r .   O n ce   th e   ch atb o h as   u n d er s to o d   wh at  t h u s er   wan ts   to   s ay ,   it  s co u r s   th web s ite  to   f i n d   t h co n ten t h at  b est  an s wer s   th e   q u e r y .   I ex tr ac ts   th r ele v an t   d ata  an d   p r o v id es  it  in   s im p le  lan g u ag u s in g   th n atu r al  la n g u ag g en er atio n   ( NL G)   u n it .   T h u s er   ca n   th en   ask   as  m an y   q u esti o n s   as  th ey   wan an d   th p r o ce s s   s tar ts   al o v er   ag ain .   T h ad v a n tag o f   m ac h in lear n in g   is   th at,   if   th u s er   r eg u lar ly   as k s   th s am q u esti o n s ,   th ch a tb o t c an   s tar t to   an ticip ate  h is   r eq u est an d   a d ap t to   h is   ca s e.   T h co m p o n en ts   o f   o u r   ar ch itect u r e   ar d escr ib e d .         3.   RE S E ARCH   M E T H O DS   I n   th is   s ec tio n ,   all  th u n its   o f   th ch atb o as  well  a s   th tec h n o lo g ies  an d   alg o r ith m s   u s ed   in   all  o f   th em   will b d escr ib e.     3 . 1 .     T he  na t ura l la ng ua g p ro ce s s ing   un it     T h f ir s s tep   f o r   u s er   r eq u est  is   th p r e - p r o ce s s in g   th at   tak es  p lace   at  th NL u n it.   T h p r e - p r o ce s s in g   u n it  is   ch ar g ed   b y   th NL wh ich   co n s is ts   o f   s ev er al  s tag es,  h en ce   th n am ed   p ip elin e.   T h e   p ip elin s tag es  ar m ain ly   p r o ject - d ep en d e n t.  As  o u r   s o l u tio n   is   b ased   o n   Dee p   L ea r n in g ,   th tex h as  to   b co n v er ted   in to   s p r ea d s h ee t.  T h er ef o r e,   th p ip elin u s ed   i n   s en tim en an aly s is   is   s h o wn   in   F ig u r 2 .   An d ,   u n its   o f   th p ip elin s y s tem   as d escr ib ed   h e r ea f ter .   Evaluation Warning : The document was created with Spire.PDF for Python.
I n d o n esian   J   E lec  E n g   &   C o m p   Sci     I SS N:  2502 - 4 7 5 2       To w a r d s   d ev elo p in g   a   p o ck et  t h era p is t:   a n   in tellig en a d a p tive  p s yc h o lo g ica l su p p o r t     ( I n tis s a r   S a lh i )   1203       Fig u r 2 .   Natu r al   lan g u a g p r o ce s s in g   p i p elin e       a)   Data   C lean in g Stem m in g   r ef e r s   to   th g e n er atio n   o f   m o r p h o lo g ical  v ar iatio n s   o f   r o o t o r   b ase  wo r d .   T h e   f ilter in g   p r o g r am s   ar c o m m o n ly   ca lled   f ilter in g   alg o r ith m s   o r   "steam er s ".   Stem m in g   alg o r ith m s   r ed u ce   wo r d s   to   s tem   ter m s .   T h s t em   is   an   im p o r tan p ar o f   t h p r o ce s s   o f   p ip ettin g   in   n atu r al  lan g u ag e   p r o ce s s in g .   Stem   in p u is   d o n u s in g   s y m b o lic  wo r d s .   Als o ,   in   th is   p ar t   p u n ctu atio n s   ar e   d elete d   b ec au s th ey   ar u s eless   ad d itio n   an d   th ey   d o   n o t a d d   v alu o r   m ea n in g   to   t h NL P m o d el.   b)   T o k en izatio n I n   th is   ce ll,  th e   co n v er tin g   p r o ce s s   o f   s tr in g   o f   tex in to   lis o f   to k en s   o r   elem en ts   is   d o n e.   T h ese  to k e n s   m ay   b w o r d s   th at  a r elem en ts   o f   a   s en ten ce ,   as  well  as  s en ten ce   th at  is   an   elem en t   o f   p a r ag r ap h .   c)   Po s T ag g in g T alk i n g   a b o u t   m ar k in g   th p a r o f   th s p ee c h ,   ca n   b d ef i n ed   as  th e   p r o ce s s   o f   attr ib u tin g   p ar o f   s p ee ch   t o   p ar ticu lar   wo r d .   T h is   is   u s u ally   ca lled   p ar o f   s p ee ch   m a r k in g   ( POS).   I n   s im p le  ter m s ,   POS  tag g in g   is   a   p r o ce s s   o f   l ab elin g   all  t h wo r d s   in   s en t en ce   with   th e i r   co r r esp o n d in g   p ar o f   s p ee ch .   W alr ea d y   k n o t h at  p ar ts   o f   s p ee ch   in clu d n o u n s ,   v er b s ,   ad jectiv es,  p r o n o u n s ,   ad v er b s ,   co n ju n ctio n s ,   an d   th eir   s u b ca teg o r ies.   d)   L em m atizin g L em m atiza tio n   r ef er s   to   th e   p r o ce s s   o f   co m b i n in g   t h d if f er e n in f lecte d   as p ec ts   o f   wo r d   to   b an aly ze d   as  o n s in g le  e lem en t.  L em m atiza tio n   wo r k s   s im ilar ly   to   in f lectio n ,   b u it  g iv es  co n tex to   wo r d s .   I t th u s   co n n ec ts   wo r d s   th at  h av s im ilar   m ea n i n g   to   th wo r d .   e)   R em o v s to p - wo r d s to p   wo r d   is   co m m o n ly   u s ed   wo r d   ( s u ch   as  "th e" ,   "a ",   "a n ",   "in ")   th at  s ea r ch   en g in h as  b ee n   p r o g r am m e d   to   ig n o r e,   b o th   wh e n   in d ex in g   en tr ies  f o r   s ea r ch   a n d   wh e n   r etr iev in g   th e m   as  r esu lt  o f   s ea r ch   q u er y .   I n d ee d ,   th ese  wo r d s   s h o u ld   n o t   o cc u p y   s p ac in   th d atab ase  an d   s h o u ld   n o t   waste  p r o ce s s in g   tim eith er .   I is   p o s s ib le  to   elim in ate  t h e m   ea s ily   b y   s to r in g   lis o f   w o r d s   co n s id er ed   as e m p ty   wo r d s .       3 . 2 .     T he  na t ura l la ng ua g c o m prehens io n uni t   -   det ec t in g   inte nt   T h is   u n it  is   in   ch a r g o f   th e   co n v er s io n   o f   th u s er ' s   s tate m en in to   a   p r eselecte d   s em a n tic  p atter n   u n d er   th s y s tem ' s   r eq u ir em en ts ,   i.e . ,   in   s y s tem   Un d er s tan d ab le  f o r m at.   T h at  in clu d es  lo ca tio n - f illi n g   task   with   in ten tio n   d etec tio n .   Fo r   in s tan ce ,   th in t e n tio n   c an   b e   g r ee tin g ,   it  ca n   b i n f o r m a tiv wh er t h u s er   g iv es  ex tr tex d ata  [ 3 8 ] .   T h task   o f   p ad d in g   lo ca tio n s   a n d   in ten tio n   d etec tio n   is   p er c eiv ed   as  s eq u en ce   lab elin g   p r o b lem .   As  r esu lt,   NL is   g en er ally   im p lem e n ted   as  an   L STM - b ased   r ec u r r e n n eu r al  n etwo r k   with   co n d itio n al  r an d o m   f i eld   ( C R F)  lay er   u p war d   o f   i t.  T h p r esen ted   p r o to ty p e   is   Seq 2 Seq   m o d el  u tili zin g   b i - d ir ec tio n al  L STM   n eu r al  n etwo r k ,   th at   f u lf ills   th in ter v als  an d   p r ed icts   in ten tio n   s im u ltan eo u s ly .   Alter n ativ ely ,   th is   m o d el  d o es  th s am th in g   b y   u s in g   th atten tio n - b ased   R NN.   T o   co m p lete  th is   r eq u est,  lab els in   th d ata  s et  co n s is t o f   th f o l lo win g : c o n ca ten ated   s tar -   in s id -   o u ts id ( -   -   O )   m ar k e r   tag s ,   in ten tio n   m a r k er   tag ,   an d   a u x iliar y   e n d   o f   s tr in g   (E - O - S)  m a r k er   tag .       a)   L o n g - ter m   an d   s h o r t - ter m   m e m o r y   m o d el   L STM   is   p ar ticu lar   ty p o f   R NN  th at  is   s u itab le  f o r   tem p o r al  d ata  o r   wh at  we  ca ll  s eq u en tial  d ata.   L STM s   p r eser v th in f o r m atio n   o v e r   tim wh ich   im p lies   th at  th ey   ca n   r em e m b er   th ei r   p r ev io u s   in p u ts ,   th is   is   wh y   th ey   ar h ig h ly   r ec o m m en d e d   f o r   tim e - s er ies  p r ed ictio n s .   with   s p ec if ic  f o r g ettin g   p o r ts ,   b esid es  th en tr y   an d   ex it  p o r ts   o f   s im p le   R NN.   L STM   is   m ad t o   k ee p   r e m em b er i n g   t h en tr y   s tate   f o r   lo n g er   d u r atio n   th an   s in g le  R NN,   th u s   en s u r in g   ac c u r ac y   in   t h p r o ce s s in g   o f   lo n g   s eq u en ce s .   Fig u r 3   s h o ws th lay o u t o f   a n   L STM   ce ll.   b)   T h co n d itio n al   r an d o m   f ield s   m o d el  ( C R F)     T h m o d el  C R m o d el  p ( y x, ω ) ,   u s ed   to   p r ed ict  th n u m b er   o f   lab els  ( y )   f r o m   th s eq u en ce s   o f   m ea s u r em en ts   ( x ) ,   is   g iv en   in   ( 1 ) ,   wh er th m o d el  p ar am eter s   ar g iv en ,   ψ ( x , y )   is   th ch o s en   ch ar ac ter is tic  v ec to r   an d   Ζ ( ω , x )   is   th cu m u lativ s u m   o f   p ( y x, ω )   f o r   all  p o s s ib le  y ' s .   T h p ar am eter s   o f   th is   m o d el  x   a n d   y   ar lear n ed   f r o m   tr ai n in g   s et.   ( , ) = { , } , = 1 , . , .   W ith   = a r g  ( , )   th co n d itio n al   m ax im u m   p r o b ab ilit y .   Fig u r e   4   is   a   r ep r esen tatio n   o f   th e   L STM - C R   b id ir ec tio n al  atten tio n   m o d el.   Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 5 0 2 - 4 7 5 2   I n d o n esian   J   E lec  E n g   &   C o m p   Sci,   Vo l.  23 ,   No .   2 Au g u s t 2 0 2 1 1 2 0 0   -   1 2 1 1   1204       Fig u r e   3 .   L STM   ce ll a r c h itectu r e           Fig u r 4 .   R ep r esen tatio n   o f   b id ir ec tio n al  L STM - C R atten ti o n   m o d el       ( , ) = ( ( , ) ) ( , )   ( 1 )     3 . 3 .     T he  na t ura l la ng ua g g ener a t io n uni t   ( NL G )   T h is   is   wh er th g en er atio n   o f   tex f r o m   r ep r esen tatio n   o f   m ea n in g   h a p p en s .   T h at  p r o ce s s   ca n   b e   co n s id er ed   as  th o p p o s ite  o f   u n d er s tan d i n g   t h n at u r al  lan g u ag e.   W ith in   th NL G,   it  an s wer s   as  s em an tic   f r am ewo r k ,   co r r esp o n d in g   to   s en ten ce   in   n atu r al  lan g u a g e,   wh ich   is   u n d e r s to o d   b y   th en d - u s er .   NL G   co m p o n en ts   ca n   b m o d el - b a s ed ,   r u le - b ased ,   o r   Hy b r id   I n   s o m s ce n ar io s .   T h r u le - b ased   NL p r o d u ce s   p r ed ef in e d   m o d el  s tatem en ts   f o r   g iv en   s em an tic  f r am ew o r k ,   s o   th e y   ar e   v er y   lim ited   a n d   h av e   n o   p o we r   o f   g en er aliza tio n .   E v e n   th o u g h   s ev er al  g en er al - p u r p o s r u le - b ased   s y s tem s   h av alr ea d y   b ee n   d ev elo p e d ,   th ese   ar o f ten   d if f icu lt to   a d ap t to   s m all  task - o r ien ted   ap p licatio n s   g iv in g   th eir   g en er aliza tio n .   Ma ch in e - lear n in g - b ased   NL G   s y s tem s   h av b ec o m in cr e asin g ly   u s ed   in   to d a y ' s   d ialo g   s y s tem s .   T h ese  NL s y s tem s   u s m u ltip le  s o u r ce s   as  in p u ts ,   in cl u d in g   th c o n ten m ap ,   wh ic h   is   m ea n in g f u r ep r esen tatio n   o f   wh at  n ee d s   to   b d eliv er e d   to   th u s er .   k n o wled g b ase,   as  s tr u ctu r ed   d atab ase  th at   p r o v id es  d o m ain - sp ec if ic  ch a r ac ter is tics .   T h User   Mo d el  p r o v id es  co n s tr ain ts   to   th o u tp u s tatem en t.  T h d ialo g   h is to r y   g iv es in f o r m ati o n   o n   th p r ev io u s   r o u n d s   t o   p r ev en t r ef e r en ce   e x p r ess io n s   a n d   r ep etitio n .       3 . 4 .     Dia lo g   m a na g e m ent   ( D M )   T h e   DM   ca n   b e   co n n ec ted   to   an   e x ter n al  d atab ase  o r   a   k n o wled g b ase  to   tr ig g e r   m o r m ea n in g f u r esp o n s es  [ 3 9 ] .   T h d ialo g u m an ag e r   h as  two   co m p o n en ts Dialo g u s tate  tr ac k in g   ( DST)   an d   p o licy   lear n in g   th at  is   th r ein f o r ce m en lear n in g   ag en ( R L ) .   DST  is   co m p lex   an d   cr u cial  co m p o n en t   to   co r r ec tly   in f er   th s tate  o f   co n v ictio n   o f   d ialo g u e,   co n s id er in g   th w h o le  h is to r y   u p   to   th is   p o in t.  Po licy   L ea r n in g   is   Evaluation Warning : The document was created with Spire.PDF for Python.
I n d o n esian   J   E lec  E n g   &   C o m p   Sci     I SS N:  2502 - 4 7 5 2       To w a r d s   d ev elo p in g   a   p o ck et  t h era p is t:   a n   in tellig en a d a p tive  p s yc h o lo g ica l su p p o r t     ( I n tis s a r   S a lh i )   1205   r esp o n s ib le  f o r   s elec tin g   th b est  ac tio n ,   i.e . ,   th s y s tem ' s   a n s wer   to   th u s er ' s   s ta tem en t,  to   b r in g   th e   u s er   to   r ea ch   its   o b jecti v in   m in im u m   n u m b er   o f   d ialo g u c y cles.     3 . 5 .     Respo ns g ener a t io n:  re info rc em ent   lea rning   wit h   Seq2 Seq   R ein f o r ce d   L ea r n in g   is   a   f i eld   o f   m ac h i n lear n in g .   I in v o lv es  tak in g   a p p r o p r iate  ac tio n s   to   m ax im ize  r ewa r d s   in   p a r ticu lar   s itu atio n .   R ein f o r ce m e n lear n in g   is   u s ed   b y   v ar ie ty   o f   s o f twar e   an d   m ac h in es  to   f in d   th e   b est  b e h av io r   o r   p ath   i n   a   s p ec if ic  s itu atio n .   I d if f er s   f r o m   s u p er v i s ed   lear n in g   in   th e   s en s th at  in   s u p er v is ed   lear n in g ,   th tr ain in g   d ata  is   ac co m p an ied   b y   an   an s wer   k ey ,   s o   th at  th m o d el  is   tr ain ed   with   th c o r r ec a n s wer   its elf ,   wh er ea s   in   r ein f o r ce m en lear n in g ,   th er is   n o   an s we r   b u th e   r ein f o r ce r   d ec id es  wh at  to   d o   to   ac co m p l is h   th g iv en   task s .   I n   ab s en ce   o f   s et  o f   tr ai n in g   d ata,   h o wev er ,   it  is   ex p ec ted   to   lear n   f r o m   its   ex p er ie n ce .     a)   R ec u r r en t n eu r al  n etwo r k   r ec u r r en t   n eu r al  n etwo r k   ( R NN)   [ 4 0 ]   is   d esig n ed   to   p r eser v th p r ev io u s   s tate  o f   n eu r o n s .   T h is   allo ws  th n eu r al  n etwo r k   to   p r eser v th co n tex an d   p r o d u ce   r esu lt  b ased   o n   th p r ev io u s   s tate.   T h i s   ap p r o ac h   m a k es  R NNs  d esira b le  f o r   ch atb o ts ,   as  it  is   ess en tial  t o   p r eser v th e   co n te x o f   co n v e r s atio n   to   u n d e r s tan d   th u s er .     b)   Seq u en ce   to   s eq u e n ce   m o d el   T h s eq 2 Seq   m o d els  [ 4 1 ]   a r e   b ased   o n   R NN  ar ch itectu r an d   c o n s is o f   two   R NNs:  o n en co d er   a n d   o n d ec o d er .   W h ile  th en co d er   p r o ce s s es  th in p u t,  th d ec o d er   d ea ls   with   th o u tp u t.  T h ese   m o d els   ca n   b c o n s id er ed   as  d ec o d er   n o d th at  p r o d u ce s   c o r r e s p o n d in g   o u t p u to   an   e n co d er   n o d e.   T h is   m o d el  is   ea s y   to   u s in   m ac h i n tr an s latio n   b ec au s wo r d   co r r esp o n d in g   to   t h o u tp u lan g u ag ca n   b e   g en er ated   b y   th d ec o d e r   ea s ily   b y   lo o k i n g   at   o n ly   o n wo r d   o f   th e   in p u lan g u ag at  tim e.   T h e   f o llo win g   f ig u r s h o ws  a   s im p le  s eq u en ce   m o d el.   W ith   is   in p u s eq u e n ce   at   s tep   I ,   th h id d en   s tate   f o r   ea ch   tim s tep ,   an d     is   o u tp u s eq u en ce   at  s tep   i.  Fig u r 5   is   r ep r esen tatio n   o f   th s eq u en c e   m o d el.           Fig u r 5 .   T h s eq u e n ce - to - s eq u en ce   m o d el  s tr u ctu r e       T h en c o d er   an d   th d ec o d er   ar L STM   m o d els  ( o r   s o m etim es  GR m o d els).   T h en co d e r   in ter p r ets  th in p u t   s eq u en ce   an d   s y n th esizes  th d ata  in to   wh at  is   k n o wn   as  in ter n al  s tat v ec to r s   as  well   a s   co n tex v ec to r s   ( in   th ca s o f   th L STM   th ey   ar ca lled   th e   h id d en   s tate  v ec to r s   o r   ce ll  s t ates) .   T h en co d er   o u tp u ts   ar elim in ated   s o   th at  o n ly   th in ter n al  s tates  ar r etain ed .   T h p u r p o s o f   th c o n tex v ec to r   is   th in teg r atio n   o f   d ata   f r o m   all  in p u ts   to   ass is th d ec o d er   t o   m ak ac cu r ate  p r ed ictio n s .   T h h id d en   s tates  ar ca lcu lated   u s in g   th ( 2 ) .       = ( ( ℎℎ ) 1 + ( )  )   ( 2 )     T h L STM   r ea d s   th e   d ata,   s eq u en ce   a f ter   s eq u e n ce .   T h u s ,   if   th e n tr y   h as  a   s eq u en ce   o f   l en g th   " n ",   it is   s aid   th at  th L STM   r ea d s   it in   tim s tep s   "n ".   T h d ec o d er   is   an   L STM   w ith   in itial  s tat es in itialized   to   th e   f in al  s tates  o f   th L STM   e n co d er ,   i.e . ,   th c o n tex v ec to r   o f   th f in al  en c o d er   ce ll  is   en ter e d   in to   t h f ir s ce ll   o f   th e   d ec o d er   n etwo r k .   B y   u s in g   th ese  in itial  s tates,  th d e co d er   s tar ts   to   g en e r ate  th e   o u tp u s eq u en ce ,   an d   th ese  r esu lts   ar also   tak en   in to   ac co u n f o r   f u tu r o u tp u ts .   p ile  o f   s ev er al  L STM   u n its   wh er p r ed icts   an   Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 5 0 2 - 4 7 5 2   I n d o n esian   J   E lec  E n g   &   C o m p   Sci,   Vo l.  23 ,   No .   2 Au g u s t 2 0 2 1 1 2 0 0   -   1 2 1 1   1206   o u tp u   at  tim s tep   n .   E v e r y   r ec u r r in g   u n it  ac ce p ts   h id d en   s tate  f r o m   th e   p r e v io u s   u n it  a n d   g e n er ates  an d   o u tp u ts   its   h id d en   s tate.   An y   h id d en   s tate    is   ca lcu lated   u s in g   th ( 3 ) .     = ( ( ℎℎ ) 1 )   ( 3 )     An d   th o u tp u   at  th tim s tep   n   is   ca lcu lated   u s in g   th ( 4 ) .     =   ( )   ( 4 )     T h e   o u tp u ts   ar e   ca lcu lated   b y   th u s o f   t h h i d d en   s tate  at  th cu r r en t   tim s tep   an d   th e   r esp ec tiv weig h W ( S).   So f tm ax   is   u s ed   to   cr ea te   p r o b a b ilit y   v ec to r   th at  will  h elp   to   d eter m in t h f in al  o u tp u t   ( f o r   ex am p le,   it is   wo r d   in   q u esti o n - an s wer   p r o b lem )   [ 4 2 ] .         4.   RE SU L T S   AND  D I SCU SS I O N   T h f ir s s tep   is   th co llectio n   o f   d ata  f r o m   th R ed d it  web s ite,   th aim   o f   th is   s tep   is   to   p r o v id th e   Data b ase,   f r ac tio n   o f   th s cr ap p in g   p r o g r am   co d is   d is p lay ed   in   F ig u r e   6 .   T h is   p ar t   is   ess en tial  s in ce   a   d atab ase  th at  m ee ts   th r e q u i r em en ts   o f   t h is   p r o b lem   is   n o av ailab le.   s elec tio n   o f   s u b - d ir ec t o r ies  ( s u b - R ed d it)  h as  b ee n   m ad e ,   to   h a v o n ly   th q u esti o n s   an d   a n s wer s   o n   m en tal  d is o r d er s .   T h s elec ted   s u b - R ed d it  ar an x iety ,   d ep r ess io n ,   s tr ess ,   d ep r ess io n _ h el p ,   talk - th e r ap y ,   ask ath er ap is t,  as sh o wn   in   th Fig u r 6 ,             Fig u r 6 .   C o llectin g   Su b R ed d its   f r o m   th R ed d it we b s ite       T h d atab ase  is   co m p letely   n ew,   it  is   p r ep a r ed   esp ec iall y   f o r   th is   ch atb o b ec a u s it  in c lu d es   q u esti o n s   an d   an s wer s   o n   is s u es  o f   m en tal  h ea lth   s u ch   as  d ep r ess io n   an d   an x iety ,   wh et h er   in   C OVI D - 19   o r   n o t,  as  well  as  th er a p is t's   an s wer s   th at  ca n   b b e n ef icial.   Fig u r 7   s h o ws  th f ir s 5   n e g ativ an d   p o s itiv e   q u esti o n s ,             Fig u r 7 .   T h f ir s t 5   p o s itiv a n d   n eg ativ q u esti o n s       Af ter   th ex ec u tio n   o f   th c o d p r esen ted   in   Fig u r 6 ,   5 7 3 5   q u esti o n s   wer co llected ,   o f   wh ich   4 0 . 5 4 wer n eg ativ es,  3 8 . 7 9 wer n eu tr al  an d   2 0 . 6 6 wer p o s itiv es.  T h is   is   p r esen te d   b y   th d iag r a m   in   Fig u r 8 .   I n   th is   s ec tio n ,   t h v er if icatio n   o f   th f r eq u en cies  o f   o cc u r r en ce   is   n ec ess ar y   to   v alid ate  th e   co llected   d atab ase.   T o   v alid at it,  it  is   n ec es s ar y   to   h av p o s itiv wo r d s .   B ec au s th ch at b o h as  d ep r ess ed   o r   an x i o u s   p er s o n   in   f r o n o f   it,  it  m u s r ea s s u r h im   an d   lead   s er io u s   co n v er s atio n   wit h   h im .   th e   p ip elin e   s tep s   o f   th n atu r al   lan g u a g p r o ce s s in g   wer e   f o llo wed   an d   th ca lcu latio n   o f   wo r d s   ap p ea r an ce   f r eq u e n cies   is   d o n e.   T a b le  1   s h o ws  th f r e q u en cy   o f   ap p ea r an ce   o f   t h m o s co m m o n   n e g ati v a n d   p o s itiv wo r d s   in   t h co llected   q u esti o n s .       f or   s ub m i s s i o n   i n   r edd i t . s u b r edd i t   ( ' a nx i e t y+  depr es s i o n   +   s t r es s   +   depr es s i o n_ h e l +   t alkt h er ap y   +   as kat h er ap i s t   +   C or o n a vi r u s ' ) . n ew ( l i m i t = No n e) :   h ea d l i nes . add( s ub m i s s i o n . t i t l e )   di s p l a y . c l ea r _o u t p ut ( )   pr i n t ( l e n ( h ea d l i nes ) )   Evaluation Warning : The document was created with Spire.PDF for Python.
I n d o n esian   J   E lec  E n g   &   C o m p   Sci     I SS N:  2502 - 4 7 5 2       To w a r d s   d ev elo p in g   a   p o ck et  t h era p is t:   a n   in tellig en a d a p tive  p s yc h o lo g ica l su p p o r t     ( I n tis s a r   S a lh i )   1207       Fig u r 8 .   Qu esti o n   d is tr ib u tio n   o f   q u esti o n s   co llected   f r o m   R ed d it       T ab le  1 .   W o r d   ap p ea r a n ce   f r e q u en cies   P o si t i v e   Ti t l e s   N e g a t i v e   Ti t l e s   W o r d   A p p e a r a n c e   F r e q u e n c y   W o r d   A p p e a r a n c e   F r e q u e n c y   H e l p   2 4 2   S t r e ss   2 3 2   Li k e   1 6 0   D e p r e ss i o n   1 9 8   Th e r a p i st     1 2 3   A n x i e t y   1 8 4   F e e l   1 1 4   Th e r a p i st   1 6 6   N e e d   82   F e e l   1 5 3   Th e r a p y   76   Li f e   98   P l e a s e   68   G e t   95   A n x i e t y   64   Th e r a p y   86   G e t   60   Li k e   86   A n y o n e   51   S t r e sse d   85   K n o w   50   W a n t   77   S o me o n e   47   B a d   76   F r i e n d   46   A n y o n e   72   Li f e   45   F e e l i n g   69   Lo v e   44   K n o w   66   G o o d   42   D e p r e ss e d   65   B e st   41   S t o p   63   B e t t e r   40   H e l p   57   S t r e ss   39   El se   56   O n e   36   P e o p l e   55       Fig u r es  9   an d   1 0   s h o w   th f r e q u en cy   d is tr ib u tio n s   o f   th e   m o s co m m o n l y   u s ed   wo r d s   in   t h p o s itiv an d   n eg ativ e   s ets,  r esp ec tiv ely .   T h e   f r e q u en c y   o f   ap p ea r an ce   o f   p o s itiv wo r d s   is   m o r im p o r tan t   th a n   n eg ativ wo r d s .   T h is   is   ex t r em ely   v al u ab le,   c o n s id er in g   th at  th e   ch atb o m u s ca r r y   o n   a   p o s itiv e   co n v er s atio n   an d   th u s   h as  to   ex p r ess   its elf   in   way   th at  m ak es  it  f ee co m f o r tab le  f o r   t h p er s o n   f ac in g   it.  Af ter   co m p letin g   t h s tep s   o f   th n atu r al  lan g u ag p r o ce s s in g   u n it,  we  m o v ed   o n   to   th n atu r al  lan g u ag co m p r eh e n s io n   u n it  an d   tr ain ed   o u r   d ata  th r o u g h   th s eq u e n ce - to - s eq u e n ce   r e - in f o r m atio n   m o d el  b u ilt  u s in g   th T en s o r Flo f r am ew o r k   [ 4 3 ]   an d   th Ker as  API   [ 4 4 ] ;   with   5 0   ep o c h s .   Fig u r es  1 1 ,   1 2   an d   1 3   s h o th e   r esu lts   o f   th tr ain in g   o f   o u r   m o d el  ar f o r   ep o ch s   1 ,   5 ,   a n d   5 0 .           Fig u r 9 .   Fre q u en cy   d is tr ib u ti o n   o f   t h ap p ea r an ce   o f   p o s itiv wo r d s   Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 5 0 2 - 4 7 5 2   I n d o n esian   J   E lec  E n g   &   C o m p   Sci,   Vo l.  23 ,   No .   2 Au g u s t 2 0 2 1 1 2 0 0   -   1 2 1 1   1208       Fig u r 1 0 .   Fre q u en c y   d is tr ib u t io n   o f   t h ap p ea r an ce   o f   n e g ativ wo r d s           Fig u r 1 1 .   T r ain in g   in   ep o ch   1           Fig u r 1 2 .   T r ain in g   in   ep o ch   5           Fig u r 1 3 .   T r ain in g   in   ep o ch   5 0       T h m o d el  h as a n   ac cu r ac y   o f   9 5 %,  th is   is   ca lcu lated   u s in g   t h (5 )       = 1    (5 )     T h co m p ar is o n   b etwe en   th p r ed ictio n s   an d   th tar g ets  is   m o r in ter esti n g ,   if   b o th   ar t h s am it  m ea n s   th at  th ch atb o is   p er f o r m in g   p r o p er ly .   T h is   ju s tifie s   th d ec is io n   to   d is p lay   th e m   o n   th e   s cr ee n s .   ch atb o ts   th at   tr ea s p ec if ic  m en tal  h ea lth   in   th e   co n tex o f   p a n d em ic  s u c h   as  th o n r elate d   to   C OVI D - 19 .   T h o th e r s   ar e   m o r g e n er al.   T h e   ap p r o ac h   t r ea ts   em o tio n s ,   wh ile  th o th e r s   d o   n o t.  Desp ite  all  th is ,   we  t ested   s o m s y s tem s   with   th co llected   d ata b ase,   th r esu lts   wer d if f er e n b u t   n o v er y   f a r   f r o m   o u r s .   t h is   ca n   b ex p lain e d   b y   th e   f ac th at  th ese  s y s tem s   ar e   n o d esig n ed   in   th e   s am co n te x an d   d o   n o tak e   em o tio n s   in to   ac co u n t.  Af te r   Evaluation Warning : The document was created with Spire.PDF for Python.
I n d o n esian   J   E lec  E n g   &   C o m p   Sci     I SS N:  2502 - 4 7 5 2       To w a r d s   d ev elo p in g   a   p o ck et  t h era p is t:   a n   in tellig en a d a p tive  p s yc h o lo g ica l su p p o r t     ( I n tis s a r   S a lh i )   1209   tr ain in g   o u r   m o d el,   we  in teg r ated   th n atu r al  lan g u a g co m p r eh en s io n   u n it  in to   th er a p is ch atb o th at  we   h av im p lem e n ted .   Fig u r e   1 4   s h o ws  th g r ap h ical  in te r f ac o f   th th e r ap is ch atb o t.  W wer ab le  to   b u ild   a   ch atb o th at   an s wer s   o u r   in itia p r o b lem ,   it  ca n   co n d u ct   d ia lo g u with   p e r s o n   in   f lu id   an d   clea r   way .   T h e   ch atb o t' s   an s wer   i s   in   th f o r m   o f   te x an d   v o ice.   T h is   ca n   f ac ilit ate  in ter ac tio n   with   th e   ch atb o t.  T h m ain   co n ce r n   t h at  o cc u r s   is   th at  h d o es n o t r esp o n d   i n   th s am way   to   m ess ag es h h as n ev e r   s ee n   b ef o r e.             Fig u r 1 4 .   T h g r ap h ical  in t e r f ac o f   th e   th er ap is t c h atb o t       5.   C O NCLU SI O N   I n   th is   p ap er ,   we  h av tr ie d   to   d ev elo p   a   ch atb o s y s tem   b ased   o n   th s eq u en tial   atten tio n   m ec h an is m   b ased   o n   d ee p   r e cu r r en n e u r al  n etwo r k s   f o r   p s y ch o lo g ical  q u e r ies,  to   h elp   p eo p le  af f ec te d   b y   m en tal  h ea lth   d is o r d er s ,   esp e cially ,   s tu d en ts   in   C OVI D - 19   p an d e m ic  s itu atio n .   W p r o p o s ed   an   ad v a n ce d   ar ch itectu r o f   an   ad a p tiv t h er ap eu tic  ch at b o with   s elf - lear n in g   ab ilit ies.  T h is   was  d esig n ed   with   th p r in cip al  o b jectiv t o   f ill  i n   a   h ea lth ca r e   g ap   in   th C OVI D - 19   p an d em ic   s itu atio n   a n d   to   p r o v id e   f le x ib le  c h at  in ter f ac to   an s wer   q u esti o n s   f r o m   p eo p le  wh o   f ee o v er wh elm ed   b y   th ev e n ts .   T h Seq 2 Seq   m o d e   p r esen ted   in   th e   p ap e r   was b u i lt  u s in g   th e   T en s o r Flo f r am e wo r k   a n d   th Ker as   API .   T h e   p er f o r m an ce   o f   th e   m o d el  was  lim ited   d u to   th lim ited   tr ain in g h o we v er ,   th e   p ap er   s h o ws  th u s o f   a   d at ab ased   ap p r o ac h   in   th co n s tr u ctio n   o f   th ch at b o t.  Sig n if ican r esu lts   ca n   b ac h iev ed   b o th   b y   u s in g   h ig h - p er f o r m a n ce   co m p u tatio n al  to o ls   an d   b y   m o d if y in g   th tr ain in g   h y p er p ar am eter s .   T h ese  will  b ta k en   in to   ac co u n in   f u tu r s tu d ies.   th is   in clu d es  also   th o p tim izatio n   o f   t h e   ch atb o u tili zin g   th m o s r ec en o p tim izatio n   m eth o d s   wh ich   a r th Gar r a   R u f o p tim izatio n ,   th e   C W O,   an d   th E HO  o p tim izatio n .       ACK NO WL E DG E M E NT   T h is   wo r k   is   s u p p o r ted   b y   th Un iv er s ity   Hass an   I I   o f   C asab lan ca -   Mo r o cc o   an d   T h Natio n a l   Scien tific   R esear ch   an d   T ec h n o lo g y   C en ter   ( C NR ST)   u n d e r   th p r o g r am   “su p p o r p r o g r a m   f o r   s cien tific   an d   tech n o lo g ical  r esear ch   r elate d   to   C OVI D - 19 ”,   p r o ject  "E lab o r atio n   o f   p s y ch o lo g i ca an d   p ed ag o g ical   s u p p o r t   p latf o r m ".       RE F E R E NC E S   [1 ]   R.   Ro d ríg u e z - Re y ,   H.   G a rrid o - He rn a n sa iz,  a n d   S .   Co l lad o ,   P sy c h o l o g ica Im p a c a n d   As so c iate d   F a c to rs  Du ri n g   th e   In it ial  S tag e   o t h e   C o ro n a v ir u (COV ID - 1 9 )   P a n d e m ic  Am o n g   t h e   G e n e ra P o p u lati o n   in   S p a i n ,   Fro n ti e rs   i n   Psy c h o lo g y v o l.   11 ,   p .   1 5 4 0 ,   2 0 2 0 ,   d o i:   1 0 . 3 3 8 9 /fp s y g . 2 0 2 0 . 0 1 5 4 0 .     Evaluation Warning : The document was created with Spire.PDF for Python.