Tuesday, 10 February 2015

LANGANA-e English parser control set test results




I had indicated that I have tested my solution with 30 sentences from KANDEL’s book.  I corrected all the mistakes of my English parser program by working on these examples.  Here are the statistical information about them.

Sentences between min and max sentence sequence in the book are indicated.

min=20890;max=20895;        94 words             5 sentences

min=20885;max=20890;        82 words             5 sentences

min=20880;max=20885;        70 words             5 sentences

min=20875;max=20880;        135 words           5 sentences

min=15035; max=15045;       228 words           10 sentences

 

Control set test is necessary to check how the program  behaves when it is used to parse ‘new’ or unexpected texts.  This shows the fitting level of the program.  When a solution is produced using a fixed number of test cases the success depends on the quality and the quantity of test cases.  If you select a too few number of cases your solution will not work.  Even if you choose many cases they have to be linearly independent so that they cover the input space cases as a whole.

 

I chose examples from different parts of KANDEL’s book so that they are possibly written by different writers.

min=15062; max=15072      227 words    10 sentences     5 mistakes          % 2.2

min=15125; max=15135      200 words    10 sentences     5 mistakes         % 2.5

min=33948; max=33958      245 words     10 sentences     8 mistakes          % 3.2

min=2679; max=2689          153 words     10 sentences     5 mistakes          % 3.3

min=42150; max=42160      232 words     10 sentences     5 mistakes          % 2.2

 

The result is; % 2.8 of the words are parsed wrong.  More importantly the fact is that almost half of the sentences have at least one mistake, possibly the only one. 

 

 The average sentence length is 21 words.   Smaller sentences tend to have less errors.

 

This shows my model has to be improved so that there is at most 1 mistake in ten sentences.  This corresponds to approx. 1 / 200 = % 0.5 mistakes.

 

I will continue to do example testing but also I will do theoretical work to outline the linearly independent test cases so that I can catch cases that I may not encounter by chance.

 

 

Saturday, 7 February 2015

News about my LANGANA-e English parser project

The first stage of parsing is determining the type of words in the given sentence's context.  This is done by rule-based programming which detects impossible cases and eliminates multiple types of a given word.  For example an adjective can not precede a adverb except the word 'most' and etc. in the form of adjective.  Yet another example is; an adjective can not be the last word in a compound name.


I have done 30 sentences from Kandel's book using this approach with 0 mistakes.  I will do some cleaning and make an abstraction of what I do and put down the principles now.  I will continue, with question sentences and passive and inverted sentences.  After this stage, I will leave the multiple cases if I can not clean them totally.  At the end, I will  make a phase in which idioms, phrases, clauses, compound and complex sentences will be parsed using the output of the previous phases.

You may find below an example parse output from KANDEL's 'Principles of Psychology' book.

Sentence=20891-------------------------------------------------------------->
. More importantly, the transmitter-induced increase in membrane conductance perturbs the critically tuned resonant circuit in the hair cell's membrane, thus decreasing both the sharpness of frequency selectivity and the gain of electrical amplification.


More
||adv. manner


importantly
||adv.


the
||+def. art.


transmitter-induced
||a.


increase
||n.


in
||+prep.


membrane
||n.


conductance
||n.


perturbs
||v. t.||present t.


the
||+def. art.


critically
||adv. manner


tuned
||v. i.||imp. & p. p. Tunned||p. pr. & vb. n. Tunning


resonant
||a.


circuit
||n.


in
||+prep.


the
||+def. art.


hair
||n.


cell's
||poss. n.


membrane
||n.


thus
||adv. manner


decreasing
||v. i.||imp. & p. p. Decreased||p. pr. & vb. n. Decreasing||v. t.


both
||conj.


the
||+def. art.


sharpness
||n.


of
||+prep.


frequency
||n.


selectivity
||n.


and
||+conj.


the
||+def. art.


gain
||n.


of
||+prep.


electrical
||a.


amplification
||n.

Wednesday, 21 January 2015

Automatic Word Type Detection in English



My LANGANA-E English parser making effort is continuing.  Currently I can take a single or a group of sentences from KANDEL's 'The Principles of Neural Science' and analyse each of its words in terms of type.




The analysis is made firstly using an in-memory array reference that lists each type of word, namely pronouns list, irregular words list etc.  Secondly the word type is taken from Webster dictionary(ver. 1910).




The example is sentence 116 at KANDEL' book:




Preface
The goal of neural science is to understand the mind.




As seen below, items coming in-memory word lists by type begin with a + sign.  Webster dictionary based types are listed as they are.




of
           ==>||+prep.||prep.



indicates both in-memory word list for prepositions and webster gives the same result.




I intend to use the memory list when things are easy to decide and Webster for more complex situations.




The next step is to decide :
1- nouns
2- adjectives
3- compound nouns
4- noun phrases
5- verbs
6- adverbs
7- noun clauses
8- subject detection
9- object detection




EXAMPLE OUTPUT:
run:
Sentence=116-------------------------------------------------------------->
Preface
           ==>||n.||v. t.||imp. & p. p. Prefaced||p. pr. & vb. n. Prefacing||v. i.
The
           ==>||+def. art.||v. i.||adv.
goal
           ==>||n.
of
           ==>||+prep.||prep.
neural
           ==>||a.
science
           ==>||n.||v. t.
is
           ==>||+reg. v.||v. i.
to
           ==>||+prep.||prep.
understand
           ==>||irreg. v. neutral||v. t.||imp. & p. p. Understood||p. pr. & vb. n. Understanding||v. i.
the
           ==>||+def. art.||v. i.||adv.
mind
           ==>||n.||v. t.||imp. & p. p. Minded||p. pr. & vb. n. Minding||v. i.
Preface
The goal of neural science is to understand the mind?
BUILD SUCCESSFUL (total time: 3 seconds)

Monday, 19 January 2015

Adverb Usage Patterns

The examples are chosen from the first 20 pages of KANDEL's The Principles of Neural Science.
Other pattern analsysis for adjectives, prepositions,  clauses, conjunctions etc. will follow.
-----------------------------------------------------------------
only
occurs only eight times in ancient Egyptian records        
v. + only + num. adj.
these questions could be addressed only in cell biological terms.     
v. + only + prep.
Wernicke proposed that only the most basic mental functions are localized  
subord. clause + only + def. article.
some of which occur only fleetingly during the seizure itself     
v. + only + adv. + prep
The actions of the brain underlie not only relatively simple motor behaviors, but  
not only subord. clause
Only recently has this view been modified          
initial only + adv. + v.
Only during the last decade,             
initial only + prep.
therefore coding for, only some aspects of specific sensory stimuli    
prep. + only + adj. + n.
-----------------------------------------------------------------
adv. + sentence
Initially molecular biology enriched our understanding of ion channels    
initial adv. + comp. n.
Finally we want to thank John Butler, for his consistent      
initial adv. + pron.     
-----------------------------------------------------------------
auxillary verb + adv. + verb + tense extension
Molecular biology also has greatly expanded our understanding      
v. + adv. + v. tense cont.
We are especially indebted to John H. Martin         
be + adv. + passive verb
they are physiologically and embryologically unrelated to the other cell types 
be + adv. + and + adv. + passive verb
neural science must continually confront certain fundamental questions   
modal + adv. + v.
in actuality glia do not commonly hold nerve cells together.     
do/does + not + adv. + v.
-----------------------------------------------------------------
be v. + adv. + adj.
it is particularly important to clarify the major        
be v. + adv. + adj.
information that is complete and generally in accord with the standards   
be v. + adj. + and + adv. + adj.
it is considerably more complex than initially envisaged by Wernicke   
more + adj. + than + adv. + adj.
they are not completely symmetrical in structure        
be v. + not + adv. + adj.
it is by no means completely determined until the age of about seven or eight 
be v. + adv. + adv. + adj.
becomes abnormally hot               
become + adv. + adj.
-----------------------------------------------------------------
adv. + sentence end .
supervised the program both scientifically and artistically.     
adv. + sentence end .
-----------------------------------------------------------------
adv. + clause
He could see clearly that neurons had cell          
adv. + clause
-----------------------------------------------------------------
early
In fact, by as early as the end of the eighteenth century      
by + as early as
the left cerebral hemisphere is severely damaged early in life.     
v. + early + prep.
This map, taken from a drawing of the early 1800s, purports to show    
the + early + n.
-----------------------------------------------------------------
subj. + adv. + v.
What we commonly call the mind is a set of operations       
subj. + adv. + v.
-----------------------------------------------------------------
v. + adv. + prep.
each hemisphere is concerned primarily with sensory and motor     
v. + adv. + prep.
-------------------------------------------------------------------
be + adv. + comp. n.
irritative lesions are exactly the opposite of those of destructive lesions  
be + adv. + comp. n.
The central nervous system is a bilateral and essentially symmetrical structure 
be + indef. article + adj. + and + adv. + adj. + n.
-----------------------------------------------------------------
prep. + adv. + compund n.
Schwann cells are small cells with relatively few processes.     
prep. + adv. + comp. n.
in connection with new or infrequently used drugs.        
prep. + adj. + or + adv. + comp. n.
cortex is divided into four anatomically distinct lobes       
prep. + adj. + adv. + comp. n.
-----------------------------------------------------------------
subj + v. + adv. + comp. n.
Thus we again stress vigorously our view,          
subj. + v. + adv. + comp. n.
the ability to develop genetically modified mice           
to + v. + adv. + comp. n.
Brodmann distinguished 52 anatomically and functionally distinct areas in the human
v. + adj. + adv. + and + adv. + comp. n.
-----------------------------------------------------------------
adv. + compund n.      
parietal, temporal, and occipital, originally named for the skull bones that encase them.
comp. n. + adv. + adj.
owe their name to their irregular, roughly star-shaped cell bodies       
adj. + adv. + adj. + n.
The cerebral hemispheres consist of a heavily wrinkled outer layer       
indef. article + adv. + adj. + n.
can still develop an essentially normal grasp of language         
indef. article + adv. + comp. n.
the auditory cortex as well as by areas collectively known as association cortex,   
comp. n. + adv. + adj.
and how highly complex behaviors can be traced to specific regions of the brain    
subord. conj. + adv. + comp. n.
who was deeply skeptical of the cytoarchitectonic approach          
subord. conj. + be + adv. + comp. n.
Penfield, and more recently George Ojemann used small electrodes       
conj. + more adv. + adv. + comp. n.
Since relatively few principles of organization give rise to considerable complexity,  
conj. + adv. + comp. n.
to provide accurate, yet vividly graphic, diagrams that allow the reader      
conj. + adv. + comp. n.
which receives information on bodily sensation.            
prep. + adv. + comp. n.
-----------------------------------------------------------------
adv. + gerund
By systematically removing Gall's functional            
by + adv. + gerund
They can be intensely emotional, ardently religious, and totally lacking in humor   
adv. + gerund
-----------------------------------------------------------------
conj. + adv. + v.
hear her voice, or simply think about her.             
conj. + adv. + v.
The selection of a single neuron from a large and initially uniform population of ectodermal cells
conj. + adv. + adj. + comp. n.
-----------------------------------------------------------------
adv. + conj.
But he could not speak grammatically or create complete sentences       
adv. + conj.
-----------------------------------------------------------------
clause + adv.
The concept of localization that ultimately emerged—and prevailed—is more     
subord. clause + adv. + v.
bind to specific receptors typically located in the membrane        
missing subord. clause + adv. + v.
found that simply looking at the book was boring           
subord. clause + adv. + gerund
and how highly complex behaviors can be traced to specific regions of the brain    
subord. clause + comp. n.
-----------------------------------------------------------------
especially
a patient's knowledge of living things, especially people,         
especially + comp. n.
-----------------------------------------------------------------

Tuesday, 28 October 2014

Uzmanlar için İleri Araştırma Aracı hız problemi çözüldü.

Daha önce 3 dakika zaman alan lithium-manic-aynı cümle içinde koşulunu şu anda 1-2 saniye içinde gerçekleştirebiliyor.

Sorunun kaynağı kullandığım MySQL veritabanı değil, kullanmış olduğum  arama algoritmasının yavaşlığıydı. Yine de eğer 'mental-disease' gibi çok geçerli bir arama kriteri seçilirse 10-15 snlik bir gecikme olabilir.  Arama yaptığım kitap Kandel'in 1230 sayfa, 720000 kelime, 60 küsur bölümlük 'Principles of Neural Science'i.

Şimdi bu hızla, kelime tipleri, deyimler, tümleçler, özne-nesne gibi cümle içi fonksiyonlar yönünde ilerleme imkanı doğmuş oldu.

Glasfish Server 3.1 log
-----------------------
INFO: WEB0671: Loading application [nbAccessKANDEL] at [/nbAccessKANDEL]
INFO: nbAccessKANDEL was successfully deployed in 501 milliseconds.
INFO: title=<-- br="">INFO: 2177    0    0    S    manic-depressive        0                56    0
INFO: title=<-- br="">INFO: 2251    0    0    S(    manic-depressive        0                58    0
INFO: title=<-- br="">INFO: 39574    0    0    ,S    manic-        0                1189    0
INFO: title=<-- br="">INFO: 39574    0    0    S    lithium        0                1189    0
INFO: found in sentence depth 39574 39574
INFO: title=<-- br="">INFO: 39639    0    0    S    manic        0                1192    0
INFO: title=<-- br="">INFO: 39674    0    0    S    manic-depressive        0                1193    0
INFO: title=<-- br="">INFO: 39786    0    0    S    manic        0                1197    0
INFO: title=<-- br="">INFO: 40375    0    0    S(    manic-depressive        0                1211    0
INFO: title=<-- br="">INFO: 40375    0    0    S    manic        0                1211    0
INFO: title=<-- br="">INFO: 40376    0    0    S    manic        0                1211    0
INFO: title=<-- br="">INFO: 40381    0    0    S    manic        0                1211    0
INFO: title=<-- br="">INFO: 40392    0    0    S    manic        0                1212    0
INFO: title=<-- br="">INFO: 40398    0    0    S    manic-        0                1212    0
INFO: title=<-- br="">INFO: 40399    0    0    S    manic-depressive        0                1212    0
INFO: title=<-- br="">INFO: 40413    0    0    S    manic        0                1213    0
INFO: title=T<-- br="">INFO: 40427    0    0    S    manic-depressive        0                1213    0
INFO: title=<-- br="">INFO: 40428    0    0    ,S    lithium        0                1213    0
INFO: title=<-- br="">INFO: 40454    0    0    S    manic        0                1214    0
INFO: title=<-- br="">INFO: 40469    0    0    RN    lithium        0                1216    0
INFO: title=<-- br="">INFO: 40469    0    0    S    manic-depressive        0                1216    0
INFO: found in sentence depth 40469 40469
INFO: title=<-- br="">INFO: 40469    0    0    S    manic        0                1216    0
INFO: title=<-- br="">INFO: 40470    0    0    S    lithium        0                1216    0
INFO: title=<-- br="">INFO: 40470    0    0    S    manic        0                1216    0
INFO: found in sentence depth 40470 40470
INFO: title=<-- br="">INFO: 40471    0    0    .S    lithium        0                1216    0
INFO: title=<-- br="">INFO: 40600    0    0    S    lithium        0                1220    0
INFO: title=<-- br="">INFO: 40601    0    0    ,S    lithium        0                1220    0
INFO: title=<-- br="">INFO: 40604    0    0    .S    lithium        0                1220    0
INFO: title=<-- br="">INFO: 40609    0    0    ,S    lithium        0                1220    0
INFO: title=<-- br="">INFO: 40612    0    0    S    lithium        0                1220    0
INFO: title=<-- br="">INFO: 40793    0    0    .S    manic-depressive        0                1225    0
INFO: title=<-- br="">INFO: 40950    0    0    S    manic        0                1226    0
INFO: title=<-- br="">INFO: 40950    0    0    S    lithium        0                1226    0
INFO: found in sentence depth 40950 40950
INFO: title=<-- br="">INFO: 42345    0    0    S    manic-depressive        0                1277    0
INFO: title=<-- br="">INFO: 43859    0    0    SRN    lithium        0                1365    0
INFO: title=<-- br="">INFO: 43859    0    0    SRN    manic-depressive        0                1366    0
INFO: title=<-- br="">INFO: 43859    0    0    SRN    manic-depressive        0                1366    0

system output log
-----------------

ant -f C:\\Users\\ars\\ARSlanganae\\bookMaint\\nbAppletCallTest -Dbrowser.context=C:\\Users\\ars\\ARSlanganae\\bookMaint\\nbAppletCallTest\\web\\CallAppletKANDEL.html -DforceRedeploy=false -Dclient.urlPart=/CallAppletKANDEL.html -Ddirectory.deployment.supported=true -Dnb.wait.for.caches=true -Dnb.internal.action.name=run.single run
init:
deps-module-jar:
deps-ear-jar:
deps-jar:
library-inclusion-in-archive:
library-inclusion-in-manifest:
compile:
compile-jsps:
Incrementally deploying nbAppletCallTest
Completed incremental distribution of nbAppletCallTest
run-deploy:
Browsing: http://localhost:8080/nbAppletCallTest/CallAppletKANDEL.html
run-display-browser:
run:
BUILD SUCCESSFUL (total time: 1 second)

Monday, 20 October 2014

ADVANCED SEARCH TOOL - ONLINE İLERİ ARAŞTIRMA ARACI - INTERNET ÜZERİNDEN

ADVANCED SEARCH TOOL - ONLINE
İLERİ ARAŞTIRMA ARACI - INTERNET ÜZERİNDEN

Bir örnek olarak KANDEL'in 1230 sayfalık PRINCIPLES OF NEURAL SCIENCE
kitabını alarak geliştirdiğim İleri Araştırma Aracı programını
intener üzerinden çalışır hale getirdim.

Uygun bir internet konumu bulabilirsem sizlerin de internet üzerinden
kullanımınıza açacağım.  Şimdilik yalnız ilgili resimleri sunuyorum.

Bundan sonra talebe bağlı olarak FAA Aircraft Maintenance Manual'ı
yapacağım.  Ayrıca bu aracı geliştirmek amacı ile, eşanlamlı kelimeler,
cümle içi alt cümleler, ve

http://tekne-techne.blogspot.com.tr/2014/10/kandelin-psikiyatri-kitab-icin-ileri.html

yazımda belirttiğim yönde ilerleyeceğim.

Bir aramanın başarılı olması bir takım anahtar kelimelere yakınlıktan öte
onların belirttiği anlam ve kavramların aranıp bulunmasına bağlıdır.
Ancak bu tür bir arama binlerce sayfalık referans metinler içinden
bir kaç sonucu eleyip çıkartabilir.  Ancak bu duyarlıkta bir arama
işi başından aşkın bir doktorun ya da mühendisin çalışmasına
faydalı olabilir.


Friday, 17 October 2014

Advanced Search Tool for KANDEL's Principles of Neural Science (INTRO)

Advanced Search Tool for KANDEL's Principles of Neural Science

This tool searches KANDEL's book for two words and if it catches
the occurrence of these words within a given depth in terms of
sentence, page or chapter, it prints the related sentences.

As an option, you can search the figure texts or titles or
plain text sections only.


Wednesday, 1 October 2014

KANDEL'in Psikiyatri kitabı için İleri Arama Aracı

KANDEL'in PRICIPLES's of NEURAL SCIENCE adlı elimdeki PDF kitabı toplam  1230 sahife.


Principles of Neural Science, 4/e
Copyright © 2000 by The McGraw-Hill Companies,


Bu kitabı işlemeye uygun şekilde düzenleyip bir mySQL veri tabanına yükledim.  Daha sonra bir örnek olarak, aynı cümle içinde geçen iki kelime kökünü arayan bir program yaptım.


Bu programla 'manic' ve 'lithium' kelimelerinin her ikisini de içeren cümleleri yazdırdım.  İlgili
çıktı aşağıdadır.  Daha sonra her iki kelimeyi aynı vererek, yalnızca 'manic' kelimesini içeren cümleleri arattırdım.  İlgili çıktı aşağıdadır.


Kandel'in kitabını veri tabanına yüklerken yalnızca basit bir kelime kelime yüklemeden öte
cümle aidiyetini de belirlediğim için bu aramaları yaptırmak çok kolay oldu (1.5 yıllık NLP çabasından sonra (:-)


Veritabanına yükleme sırasında bilgi işlemekten öte, bilginin veri tabanında belirli bir düzen kazanması nedeni ile şimdi:


1-page num indication
2-chapter num indication
3-title-text
4-figure-text
5-paragraph num indication


bilgilerini de yine veritabanına eklemek mümkün.


Bunlardan başka:
1-wordtype  (hazırlamış olduğum Webster sözlüğü veritabanından)
2-kelime ekinin belirlenmesi (Webster'den faydalanarak)
3-idiom-deyim kontrolü (Webster'den)


Yukarıdaki bilgileri kullanarak en son aşama:
4-phrase-tümleç belirlenmesi
5-cümle içindeki fonksiyon (özne,nesne, fiil, zarf vb).


Bu aşamaların hepsi geçilince arama işlevi basit bir kelimeden öte anlama yaklaşan işlevsellliğe kavuşabilir.  Örneğin:


Ali okula gitti.
Ahmet Ali'ye gitti.


cümlelerinde Ali yer zarfı olarak aranırsa başka sonuç, özne olarak aranırsa başka sonuç çıkar.
Tabii, arama duyarlılığı bu kadar arttığında, kullanıcıyı olayın karışıklığından kurtarmak için
NLP ile yazılmış doğal dilli soruları anlayan bir kullanıcı arayüzü geliştirmek gerekir.


Bu arayüz ilk olarak, aynen yukarıdaki algoritmaları kullanarak soruyu parse ederek

Ali nereye gitti?
Ali[ÖZNE] nereye[yer zarfı-e,a] gitti[fiil-dili geçmiş]

şeklinde parse etmeli.  Buradan çıkarttığı bilgi ile hem Ali kelimesini hem de onun ÖZNE işlevinde olanını vb aramalı.


KANDEL için geliştirdiğim bu İLERİ ARAMA ARACI, her türlü kitap için belirli bir uyarlama(paragraf,başlık stilleri vb) ile kullanılabilir.


Bu aracın kitap dönüştürme kısmını kullanıcıya vermeye gerek yok.  Kullanıcı kitabını verecek ve kitabın dönüşmüş hali ile soru sorma aracı kısmını alacak.  Kitabın ilgisiz kimselerin eline geçmemesi için de bir güvenlikönlemi olacak.


Saygılarımla.


SEARH 'MANIC' and 'LITHIUM' IN THE SAME SENTENCE---------------------------------------------
run:
38765. sentence = For example, manic-
depressive illness responds to lithium, but other mental illnesses do not.
•    

39640. sentence = P.1215
P.1216
Lithium salts, first reported in the psychiatric treatment of manic-depressive illness in 1949 by John Cade, are effective in terminating manic episodes and are used
as mood stabilizers.

39641. sentence = Moreover, maintenance therapy with lithium is of significant prophylactic value in preventing or attenuating recurrent manic and, to a lesser
extent, depressive episodes.

40109. sentence = The treatment of manic psychoses by the administration of lithium salts.

BUILD SUCCESSFUL (total time: 3 minutes 6 seconds)


SEARCH SENTENCES WITH 'MANIC' ONLY -----------------------------------------------
run:
2012. sentence = 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.

2081. sentence = Similarly, bipolar affective disorder (manic-depressive illness) frequently occurs in both siblings if they are monozygotic twins, but it occurs less frequently in both
siblings if they are dizygotic twins.

3774. sentence = Zemanick MC, Strick PL, Dix RD.

38765. sentence = For example, manic-
depressive illness responds to lithium, but other mental illnesses do not.
•    

38828. sentence = Kraepelin called the second newly defined syndrome manic - depressive psychosis.

38860. sentence = In diagnosing schizophrenia it is important to exclude a disorder of mood, especially manic-depressive illness or a drug-induced psychosis resulting from the use of
amphetamine, PCP, or other psychostimulants.

38966. sentence = In 1951 this idea was tested by John Delay and Pierre Deniker, who found that a high dosage of
chlorpromazine calmed highly agitated and aggressive patients who had either schizophrenic or manic depressive symptoms.



39546. sentence = Bipolar Depressive (Manic-Depressive) Disorders Give Rise to Alternating Euphoria and Depression
About 25% of patients with major depression (or two million people in the United States) will also experience a manic episode, if only a mild one.

39547. sentence = Patients who
experience both depressive and manic episodes have a distinct disorder called bipolar mood disorder.

39552. sentence = The manic episodes are characterized by an elevated, expansive, or
irritable mood lasting at least one week, together with several of the following symptoms:

39563. sentence = During the depressive phase of the bipolar disease activity is decreased, while during the manic phase it is increased.

39569. sentence = Seymour Kety, Paul Wender, and David Rosenthal extended their studies of patterns of schizophrenia in the families of adoptees (Chapter 60) to include manic-
depressive disorders.

39570. sentence = They found that the rate of mood disorders among the biological parents of adoptees with depressive or manic-depressive illness was higher
than among the adoptive parents (and higher than the rate among biological and adoptive parents of mentally healthy adoptees).

39584. sentence = In contrast, in patients with bipolar disease this region shows an
increase in activity during the manic phase of the illness.




39598. sentence = Unipolar Depressive and Manic-Depressive Disorders Can Be Treated Effectively
There are four effective treatments for unipolar and bipolar illnesses:

39625. sentence = Patients with bipolar depression occasionally become manic during treatment with either class of antidepressant drugs.

39640. sentence = P.1215
P.1216
Lithium salts, first reported in the psychiatric treatment of manic-depressive illness in 1949 by John Cade, are effective in terminating manic episodes and are used
as mood stabilizers.

39641. sentence = Moreover, maintenance therapy with lithium is of significant prophylactic value in preventing or attenuating recurrent manic and, to a lesser
extent, depressive episodes.

39952. sentence = Manic-Depressive Illness.

40109. sentence = The treatment of manic psychoses by the administration of lithium salts.

41464. sentence = There is now substantial evidence that the susceptibility to major psychotic illnessesschizophrenia and manic-depressive disordersis heritable and is due to allelic
variations.

BUILD SUCCESSFUL (total time: 3 minutes 11 seconds)

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/