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)