Package relations

Class SenSimplifier


  • public class SenSimplifier
    extends Object
    Author:
    Chinh
    • Constructor Detail

      • SenSimplifier

        public SenSimplifier​(DBUtils dbs)
      • SenSimplifier

        public SenSimplifier()
    • Method Detail

      • setDB

        public void setDB​(DBUtils dbs)
        Set default database
        Parameters:
        dbs -
      • loadPatterns

        public Map<String,​Rules>[] loadPatterns​(DBUtils db)
        Load pattern from database
        Parameters:
        db - : DB source to load pattern (training DB)
      • loadSimpleDic

        public void loadSimpleDic()
      • setSimpleDic

        public void setSimpleDic​(Set<String> map)
      • loadDict

        public final void loadDict​(DBUtils dbs)
        Load dictionary from default database DB: DB source to load dictionary
      • setModifier

        public void setModifier()
        These data learn form Modifier Learner; It would be nicer to automatically set these modifiers. However, due to their complexity, for now, semi-automatic approach is applied i.e. we need to check muanually for each trigger.
      • getPIndex

        public int getPIndex​(String pname)
      • findProIndex

        public int findProIndex​(List<TData> plist,
                                int pos)
      • loadPMIDs

        public List<String> loadPMIDs()
        Load abstract ID from database
      • loadSentence

        public String loadSentence​(String pmid)
      • testSpliter

        public void testSpliter()
      • brLine

        public String[] brLine​(String txt,
                               String br)
        Used to split the text after the title which often does not end with a full stop, this posing an issue for the sentence splitter.
        Parameters:
        txt -
        br -
        Returns:
      • getSenIndex

        public int getSenIndex​(int start,
                               int[] subpos)
      • getOffset

        public int getOffset​(int idx,
                             int[] subpos)
      • doSimplify

        @Deprecated
        public void doSimplify()
        Deprecated.
      • closeDB

        public void closeDB()
      • main

        public static void main​(String[] args)