Tuesday, 17 March 2015

How to decode an android application-APK file and reengineer


How to decode an android application to JAVA


1- http://stackoverflow.com/questions/1249973/decompiling-dex-into-java-sourcecode

Get these tools:
1) dex2jar, which is made by a Chinese student. It will translate dex files to jar files
2) jd-gui to view the java files in the jar

The source code is quite readable as dex2jar makes some optimizations.

Procedure:
And here's the procedure on how to decompile:

Step 1:
Convert classes.dex in test_apk-debug.apk to test_apk-debug_dex2jar.jar
d2j-dex2jar.sh -f -o output_jar.jar apk_to_decompile.apk
Note: In the Windows machines all the .sh scripts are replaced by .bat scripts
dex2jar documentation

Step 2:
Open the jar in JD-GUI


How to decode res (resource files)

C:\Users\ars\Desktop\APKtool\prebuilt\aapt\windows>aapt c -S .\res -C .\out 2>error.txt

Crunching PNG Files in source dir: .\res
To destination dir: .\out


C:\Users\ars\Desktop\APKtool\prebuilt\aapt\windows>aapt
Android Asset Packaging Tool
Usage:
 aapt l[ist] [-v] [-a] file.{zip,jar,apk}
   List contents of Zip-compatible archive.
...

C:\Users\ars\Desktop\APKtool\prebuilt\aapt\windows>aapt c -S .\res\layout -C .\out

Crunching PNG Files in source dir: .\res\layout
To destination dir: .\out


C:\Users\ars\Desktop\APKtool\prebuilt\aapt\windows>

HOW TO connect REEDER7iC to Android studio

Connecting REEDER7iC to Android studio


1- I connected the cable.  I did start->computer->right click->manage->device manager
->others
(using Windows7).

Others displayed a yellow ! sign next to ‘MTP’.

I could not see the portable device in the start->computer-> screen.

2- I found and downloaded the reederA7iC driver.
IntelAndroidDrvSetup1.1.5.exe

After I installed start->computer-> portable devices reederA7ic appeared.


3- The computer can see the reeder as portable device but Android Studio could not see it.

I did start->computer->right click->manage->device manager->others

Still displayed yellow ! mark next to ‘MTP’
But it also displayed the portable device->reederA7iC


4- C:\Users\ars\android-sdks\platform-tools>adb kill-server

C:\Users\ars\android-sdks\platform-tools>adb start-server
* daemon not running. starting it now on port 5037 *
* daemon started successfully *


5- C:\Users\ars\android-sdks\platform-tools>adb devices
List of devices attached


It still did not list the reederA7iC device.


6- Android studio->tools->SDK manager->Google USB driver  install...
x64 os
CertMgr.exe MFLD_USB_driver_cert.cer returned 0
Installing drivers, please wait
drvinstall.exe gadget_multi.inf returned 0
drvinstall.exe gserial.inf returned 0
drvinstall.exe rndis.inf returned 0
drvinstall.exe intelmtp.inf returned 0
drvinstall.exe android_winusb.inf returned 0

7- It still did not list the reederA7iC device and device did not appear at
Android Studio->Android window at the bottom or ADB(Android Device Bridge)
adb devices     command.

8- http://stackoverflow.com/questions/17509422/android-device-is-not-connected-to-usb-for-debugging-android-studio

This solution works for every unregonized android device... mostly general brands don´t come with usb debugging drivers...

• go to settings
• control panel
• hardware and sound
• device manager
• And look for any devices showing an error. Many androids will show as an unknown USB device or just Android

First thing you need will be your device IDs. You can get them opening up the device manager and finding the "Unknown Device" with a yellow exclamation point. Right click on it and select 'Properties', and then go to the 'Details' tab. Under the 'Property' drop down menu, select hardware IDs. There should be two strings:

USB\VID_2207&PID_0011&REV_0222&MI_01
USB\VID_2207&PID_0011&MI_01

Copy those strings somewhere and then navigate to where you downloaded the Google USB driver. Then you need to open up the file 'android_winusb.inf' in a text editor. I would recommend using Notepad++.

Not this one->C:\Windows\System32\DriverStore\FileRepository\ winusb.inf_amd64_neutral_6cb50ae9f480775b

Not this one->C:\Windows\System32
\DriverStore\FileRepository\android_winusb.inf_amd64_neutral_ad188d208ea0ea22

C:\Users\ars\android-sdks\extras\google\usb_driver
First, create a sub-section for your device. I called mine ';RCA 6378W2' but it doesn't really matter what you call it. Then, under the sub-section you created paste the Device ID strings you copied from the Device Manager, preceded by '%SingleAdbInterface%'. If you need help, look at this screenshot

NOTE: If you are using Windows 8 or 8.1, you will need to disable device driver signature checks before you'll be able to install the modified driver. Here's a quick video on how to disable device driver checks http://www.youtube.com/watch?v=NM1MN8QZhnk. Ignore the part at the beginning about 64 bit, your computer architecture doesn't matter


9- C:\Users\ars\android-sdks\extras\google\usb_driver\
android_winusb setup information file -> android_winusb.INF

10- Start->Computer->right click-> manage->Device manager->others->MTP->right click ->properties->details(dropdownlistbox)->hardwareIDs  

11- ;MTP (ARS)

%SingleAdbInterface% = USB_Install, USB\VID_8087&PID_0A16&REV_????&MI_01
%SingleAdbInterface% = USB_Install, USB\VID_8087&PID_0A16&MI_01

12- After this I reloaded the reederA7iC driver again.

13- Device manager displayed Android Device at the top and Android aDB Interface underneath it.  Others->MTP disappeared.

14- Android Studio began to work with the reeder device.

15- When the reeder device is not connected device manager does not display the related items on its list.


Please contact arsaral (at) yahoo.com if you need help.

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)