Sunday 28 September 2014

Work in Progress - Advanced Search Tool for Professionals

Profesyonellerin kullandığı İngilizce teknik referans kitapların kullanımını kolaylaştıracak ve çok hızlandıracak İLERİ ARAMA ALETİ geliştirme çalışmam yeni bir aşamaya ulaştı.


Bu aşamada KANDEL'in ~1200 sayfalık psikiyatri referans kitabını bir MySQL tabanına attım.  Aşağıda görüldüğü gibi her kelime için ayrı bir kayıt koydum.  Ayrıca kelime bilgisini içeren sütundan önce bir başka sütunda S=space R=carriage return N=Newline gibi metinin
formatına ilişkin bilgileri koydum.  Böylece, Kandel'in kitabının orjinalinde bir paragraf ya da satır sonu varsa veri tabanında bu bilgiyi de korumuş oldum.


Aşağıda 2006 cümle sıra nosu, alt-cümle sıras nosı, kelime sıra nosu, .S bir önceki cümlenin noktası ve boşluk, kelime ve kelime tanıtım sayısıdır.


System.out.println(sentenceCount+"\t"+sub_sentence_no+"\t"+word_no+"\t"+pre_word+"\t"+word
                        +"\t"+word_type+"\t"+word_id+"\t"+idiom+"\t"+phrase+"\t"+function);
Ayrıca, kelime tipi, deyim, tümleç ve cümle içindeki işlev belirtmek amacıyla alanlar bıraktım.     

i=33761---->2006 0 0 .S As  0  
i=33762---->2006 0 0 S in  0  
i=33763---->2006 0 0 S Huntington  0  
i=33764---->2006 0 0 S disease  0  
i=33765---->2006 0 0 ,S progressive  0  
i=33766---->2006 0 0 S death  0  
i=33767---->2006 0 0 S of  0  
i=33768---->2006 0 0 S specific  0  
i=33769---->2006 0 0 SRN subpopulations  0  
i=33770---->2006 0 0 S of  0  
i=33771---->2006 0 0 S neurons  0  
i=33772---->2006 0 0 S or  0  
i=33773---->2006 0 0 S muscle  0  
i=33774---->2006 0 0 S cells  0  
i=33775---->2006 0 0 S occurs  0  
i=33776---->2006 0 0 S in  0  
i=33777---->2006 0 0 S many  0  
i=33778---->2006 0 0 S of  0  
i=33779---->2006 0 0 S these  0  
i=33780---->2006 0 0 S diseases  0  


sentenceCount=2006 SENTENCEEEEEEEEEEEEEEEEEEEEEEeeeeeeeeeeeeeee
As in Huntington disease, progressive death of specific
subpopulations of neurons or muscle cells occurs in many of these diseases.


Ek bir tabloda ise:
CREATE TABLE `kandelext` (
   `WORD_SEQ` int(8) NOT NULL,
   `SENTENCE_NO` int(6) NOT NULL,
   `SUB_SENTENCE_NO` int(2) NOT NULL,
   `WORD_NO` int(3) NOT NULL,
   `TITLE` varchar(7) NOT NULL DEFAULT '',
   `CHAPTER` varchar(8) NOT NULL DEFAULT '',
   `PAGE_NO` varchar(8) NOT NULL,
   `FIGURE_TEXT` varchar(5) DEFAULT NULL,
   PRIMARY KEY (`SENTENCE_NO`,`SUB_SENTENCE_NO`)
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;

 Kelimenin bir başlık parçası, içinde bulunduğu bölüm ve sayfa nosu,  şekil açıklaması parçası olduğuna ilişkin bilgiler olacak.

 Şimdi, bu bilgileri, veri tabanına yazmış olduğum Kandel kaba verilerinden  çıkarıp üretmek aşamasındayım.  Sayfa no, kelime tipi, deyim vb nispeten kolay.   Tümleç, cümle içindeki işlev çok zor.

 Turkis Language Parser çalışmamdan edindiğim tecrübe ile, bu sefer çalışma sonuçlarını  en kısa zamanda internette görünür kılmaya çalışacağım.  İlk işim tek cümle  içinde birden çok kelime bulmaya yönelik basit bit alet yapıp internetten  ulaşılabilir kılmak, Kandel'in Psikiyatri referansı için...

i=33906---->2012 0 0 .RNRN Most  0  
i=33907---->2012 0 0 S common  0  
i=33908---->2012 0 0 S multigenic  0  
i=33909---->2012 0 0 S diseases  0  
i=33910---->2012 0 0 ,S such  0  
i=33911---->2012 0 0 S as  0  
i=33912---->2012 0 0 S diabetes  0  
i=33913---->2012 0 0 ,S coronary  0  
i=33914---->2012 0 0 S artery  0  
i=33915---->2012 0 0 S disease  0  
i=33916---->2012 0 0 ,S asthma  0  
i=33917---->2012 0 0 ,S schizophrenia  0  
i=33918---->2012 0 0 ,SRN P  0  
 ACRONYMMMMMMMmmmmmmmmmmmmmmmmmm
 PAGEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEeeeeeeeeeeeeeeeeeeeee
i=33919---->2012 0 0 . 56  0  
i=33920---->2012 0 0 RN and  0  
i=33921---->2012 0 0 S manic-depressive  0  
i=33922---->2012 0 0 S disorder  0  
i=33923---->2012 0 0 ,S are  0  
i=33924---->2012 0 0 S thought  0  
i=33925---->2012 0 0 S to  0  
i=33926---->2012 0 0 S represent  0  
i=33927---->2012 0 0 S a  0  
i=33928---->2012 0 0 S variety  0  
i=33929---->2012 0 0 S of  0  
i=33930---->2012 0 0 S disorders  0  
i=33931---->2012 0 0 S both  0  
i=33932---->2012 0 0 S etiologically  0  
i=33933---->2012 0 0 S and  0  
i=33934---->2012 0 0 S genetically  0  
sentenceCount=2012 SENTENCEEEEEEEEEEEEEEEEEEEEEEeeeeeeeeeeeeeee
Most common multigenic diseases, such as diabetes, coronary artery disease, asthma, schizophrenia,
P.56
and manic-depressive disorder, are thought to represent a variety of disorders both etiologically and genetically.

Monday 1 September 2014

word types extracted from WEBSTER DICTIONARY(1910)

/**
 * word types extracted from WEBSTER DICTIONARY(1910) with webst9 JAVACC Parser
 * and other JAVA programs by: Ali Riza SARAL
 *
 * Copyright (C) 2014 Ali Riza SARAL
 * Copyright (C) Creative Commons - Attribution-NonCommercial-NoDerivs 3.0 Unported
 *
 * You are not allowed to use this word types dictionary without getting
 * prior written consent from me.  I will be supporting non-profit efforts.
 *
 * Author: Ali Riza SARAL
 * E-mail: arsaral (at) yahoo.com
 * Date: 1/8/2014
 *
 * This dictionary is produced by parsing WEBSTER DICTIONARY's 1910 version as input
 * writing a JAVACC parser which can handle the complete dictionary and
 * extract only word types.  A JAVA program is used to extract p. p. of xxxx
 * xxxx values and synnonyms again from the main input file WEBSTER dictionary.
 * The first parsing output is used to get the anchor points in the dictionary.
 * The anchor points are ıused by the batch JAVA program to extract detail info.
 * The output at this point is parsed again to produce the semi-final output as
 * is below.  This semi-final output will be used to put the wordtype data into
 * a mySQL database.
 *
 * I will use this DB data to extract wordtypes of books both word and context(functional)wise.
 * This data will be used to extract meaning and advanced search very thick reference books
 * in medicine and aviation.
 *
 * You can find in depth analysis and examples o(f|n) this parser at
 * http://tekne-techne.blogspot.com/ 
 */

 http://sourceforge.net/projects/turkishlanguageparser/files/English%20word%20types%20dictionary/