• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

design stemming option when search in robohelp

New Here ,
Sep 18, 2018 Sep 18, 2018

Copy link to clipboard

Copied

hi i need some help to understand how searching is working in  robohelp  i had an idea  to include Arabic stemming feature so i tried to analyses the search how its works in adobe robohelp what i understand is but i'm no sure that index have alphabet structure to speed up the process of searching rather than search the whole index files,

so if i search for example "help" it  will begin to to find the closet match words that start with this characters of the search words until find it and the code responsible for that is in mhfhodt.js:

    this.getWordRec = function ( a_strQuery , bPhraseSearch)
    {


        if (!bPhraseSearch && IsStopWord(a_strQuery, gaFtsStop))
            return ""; // Return empty if no phrase search and term is a stop word.
        var i;
        var begin = 0 ;
        var end = this.curData.aNodes.length ;
        var mid = Math.floor((end -begin ) / 2) ;
        while (mid > 0 )
        {
            i++;

            mid = mid + begin ;           
            var term = this.curData.aNodes[mid].aAttrs["nm"] ;


            console.log(mid);

            if (a_strQuery < term)
                end = mid ;
            else if (a_strQuery > term)
                begin = mid ;
            else
                break ;

            mid = Math.floor((end -begin ) / 2) ;



        }
        if (((end-begin) == 1)&&(!this.matchPrefix(a_strQuery,this.curData.aNodes[mid].aAttrs["nm"])))
        {
            mid = end ;   

        }



        if (mid < this.curData.aNodes.length)
        {
            if (!bPhraseSearch && gsSubstrSrch)
            {
                //get all the records with matching prefix
                var arrTopicRecs = new Array();
                while( mid<this.curData.aNodes.length)
                {
                    if (this.curData.aNodes[mid].aAttrs["sp"])
                    {
                        mid++ ;
                        continue ;
                    }
                    else if (this.matchPrefix(a_strQuery,this.curData.aNodes[mid].aAttrs["nm"]))
                    {
                        arrTopicRecs[arrTopicRecs.length] = this.curData.aNodes[mid].aAttrs["rd"] ;

                        mid++ ;
                    }
                    else
                        break ;
                }
                if (arrTopicRecs.length == 0 )
                    return "" ;
                var mergedRec = arrTopicRecs[0] ;
                for (var i = 1 ; i < arrTopicRecs.length ; i++)
                {
                    mergedRec = mergeTopicRec(mergedRec , arrTopicRecs);
                }
                return mergedRec ;                                   
            }
            else
            {
                //get the one with exact match
                if ((this.curData.aNodes[mid].aAttrs["nm"])==a_strQuery)
                {


                    if (bPhraseSearch || gsSubstrSrch){


                    return this.curData.aNodes[mid].aAttrs["rd"];
                    }


                    else
                    {
                        //do not return stop words
                        if (this.curData.aNodes[mid].aAttrs["sp"])
                            return "" ;
                        else
                            return this.curData.aNodes[mid].aAttrs["rd"] ;


                    }       
                }
                else
                    return "" ;
            }
        }           
    }

my idea was to stem the searched word  and compare it to index files and also the index words stemmed dynamically ;

let say i had stemmed function called stemmer() ;

so if i do this :

a_strQuery = stemmer( a_strQuery) ;

also the returned alphabet words from index like this:

var term = this.curData.aNodes[mid].aAttrs["nm"] ;

term= stemmer(term) ;

so if i compare  the value  "a_strQuery" with the value  "term" is it possible to works ??
i tried it but its not working as i expected but i think the principle could be applied can some one give some hints i mean where should i modify the scripts to make work

Message was edited by: jomart mirza

Views

306

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 19, 2018 Sep 19, 2018

Copy link to clipboard

Copied

I can't help you with this one and I doubt that you will get help here for a matter related to the internal code.

I do know that people who have used substring search found it resulted in very slow performance and they turned if off.


See www.grainge.org for free RoboHelp and Authoring information.

@petergrainge

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 04, 2018 Oct 04, 2018

Copy link to clipboard

Copied

ok i have another question i have legal copy of robohelp 2015 but i need to hack the core scripts of the search engine for responsive type help system to support more options for Arabic search and highlighter is it legal to do that ? i really don't have choice and i don't know how to use the api kit or how much offer me the availability to modify what i need so is it legal or not ?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 04, 2018 Oct 04, 2018

Copy link to clipboard

Copied

If you know JavaScript you can hack all you want - it's your output - just don't look for too much assistance here (we're mostly not programmers). You could try contacting Willam van Weelden (Willam van Weelden​) on his helpesstentials.com site.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 04, 2018 Oct 04, 2018

Copy link to clipboard

Copied

If you are talking about editing the js files that ship with RoboHelp and that are used in the outputs, I have seen people report they have modified this file or that to fix some issue, such as highlighting. I have not seen Adobe take issue with that.

My feeling is that it is OK as long as you don't then complain something doesn't work.

That said what is within the terms of the licence is something that only Adobe can answer. You would need to contact them if you are still concerned, unless someone from Adobe is looking in and would like to respond.


See www.grainge.org for free RoboHelp and Authoring information.

@petergrainge

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 04, 2018 Oct 04, 2018

Copy link to clipboard

Copied

LATEST

no i don't modify any thing inside installed adobe files, i only modify the output generated for my project

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 04, 2018 Oct 04, 2018

Copy link to clipboard

Copied

i previously  contact adobe support and asked them this question  and they tell me its legal as long as you are using the api kit but i couldn't find more information on how to use the api kit or it can be used to modify some functions in the core scripts but if as you said true then i think its OK to hack my output as i want i mean i'm really feel bad about that cause i paid really high price to get the robohelp and worked so much hard to support arabic search and highlighter but when adobe support said that i felt really bad cause i really want my customized project output to be legal and yes i have good knowledge to improve even more what adobe team did in search engine but in the end javascript have some limit it can't be like lucene engine but i can improve to Little bit but closer to it

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
RoboHelp Documentation
Download Adobe RoboHelp