SlideShare a Scribd company logo
Run Berkeley parser on Windows 7 (64bit) & java environment building
recorded by Aaron
[http://www.linkedin.com/in/aaronhan]

1. Download JDK, JDK is a development environment for building
applications, applets, and components using the Java programming
language, from
“http://www.oracle.com/technetwork/java/javase/downloads/jdk7downloads-1880260.html”
2. Install “jdk-7u45-windows-x64.exe”
3. Configure the environment variables for windows 7 (64-bit).
[reference:
http://blog.163.com/wutianshui@126/blog/static/1869346220099455
115417/]
Go to your computer -> property - > higher system setting -> environment
variable
Windows 7 64 java envirenment build
Windows 7 64 java envirenment build
New -> Type “classpath” in the variable name, “C:Program
FilesJavajdk1.7.0_45libdt.jar;C:Program FilesJava
jdk1.7.0_45libtools.jar;.;” in the value of variable. Press the confirm
button.
New -> Type “java_home” in the variable name, “;C:Program
FilesJavajdk1.7.0_45” in the end of previous value of variable. Press the
confirm button.
Select the “path” variable from the existing list, press edit button, type
“;%JAVA_HOME%bin” in the end of the previous value.

4. Build “Hello world” file to test your environment.
Go to the desktop, build the file “HelloWorld.java”, put the following
content into the file:
--------------------------the following hello world java code---------------public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World");
}
}
----------------------------------------------Open the cmd window, type the following code:
cd desktop
java HelloWorld
If it shows the following words, succeed!

Begin the new life of java programming?

5. Download Berkeley parser
(https://code.google.com/p/berkeleyparser/downloads/list).
Download parser file “BerkeleyParser-1.7.jar”
Download English grammar file “eng_sm6.gr”
6. Prepare segmented English corpus.
In the same directory of the downloaded tools, build an English
example file named as “sampleenglish.seg”, and put this sentence
“this is a small house .” into this file.
7. Run the Berkeley English parser for the first time.
If you put the downloaded file in the directory “E:Berkeley Parser”
Goto the “cmd” window, type the following commands.
E:
cd “Berkeley Parser”
java -jar BerkeleyParser-1.7.jar -gr eng_sm6.gr -inputFile
sampleenglish.seg -outputFile englishout.txt –render
The above command “-render” is to generate the parsed picture.

Wait for one moment, then it will generate the files “englishout.txt”
and “thisisasmallhouse.png”. In the “englishout.txt” file there is the
parsed sentence “( (S (NP (DT this)) (VP (VBZ is) (NP (DT a) (JJ small)
(NN house))) (. .)) )”, and in the .png file, there is the parsed picture.
===========================================
Train English grammar:
Run Berkeley parser using “WSJ” English corpora. The “.mrg”
documents contain the fully tagged English sentences while the “.prd”
documents do not contain the POS tags of the words. Here we first use
the fully tagged “.mrg” documents.
Using the following command to training the English grammar:

After around 8 hours, it finished the training as below:
### above name is not suitable. It should be “TrainedGramEng.WSJ”
instead of TrainedGramChi.CTB7.
Above running information shows the default training documents
used by the Berkeley.parser. for WSJ corpora are from the document
ID number 200 to the ID 2199.
The following command can be run, which means that the
Berkeley.parser for English WSJ corpora is defaulted for the “.mrg”
documents instead of the “.prd” documents.

the begging of the running information is as below:
Training began from 2013-11-10-16:30; finished at
Store the running details of training grammar by the command
“command…. > store.file.name” after training finished.
=====================================
Testing:
[[To the test the performance of a grammar you can use:
java -cp berkeleyParser.jar edu.berkeley.nlp.PCFGLA.GrammarTester path <WSJ location> -in <grammar-file>]]
the testing command of the trained grammar:
The testing score shows that:

To record the running details of the testing stage, use the command:

=============================================
Another training and testing of English grammar:
The command of the training is below:

After around xx hours, the training of the grammar finished as below:
Export the training record using below command, this will run the
training once more, so you can use this command when you begin the
training:

The testing command:

The result shows the scores as below, which are the same values with
last testing run:
Windows 7 64 java envirenment build

More Related Content

DOCX
Backup and Recovery
PPT
Practical Installation Process Of New Gen Lib Oss On Windows Xp For Library A...
PPT
Newgenlib
PPTX
Postgresql Database Administration Basic - Day2
PDF
Database decommission process
TXT
Oracle ORA Errors
PPTX
Database administration commands
TXT
Db health check
Backup and Recovery
Practical Installation Process Of New Gen Lib Oss On Windows Xp For Library A...
Newgenlib
Postgresql Database Administration Basic - Day2
Database decommission process
Oracle ORA Errors
Database administration commands
Db health check

What's hot (18)

PPT
Installation Process Of New Gen Lib Oss On Windows Xp For Library Automation ...
ODP
Postgre sql unleashed
PPTX
PostgreSQL- An Introduction
DOCX
Change DB Name
PPTX
Building frameworks over Selenium
PPTX
Introduction to PostgreSQL
PDF
Hotsos 2017 - Protect or Perform by Paul G. Matuszyk
PPTX
Postgresql Database Administration Basic - Day1
PPTX
MySQL Audit using Percona audit plugin and ELK
PDF
Beefataque
PDF
9.1 Mystery Tour
PPTX
adding_os_command_capability_to_plsql_with_java_stored_procedures
PDF
Mongodb replication
PDF
Tutorial all pp_pg_admin_backup_restore
DOCX
Enable archivelod mode in oracle rac12cR1 with asm location
DOC
Create manula and automaticly database
PDF
PL/SQL Unit Testing Can Be Fun
PPTX
Config BuildConfig
Installation Process Of New Gen Lib Oss On Windows Xp For Library Automation ...
Postgre sql unleashed
PostgreSQL- An Introduction
Change DB Name
Building frameworks over Selenium
Introduction to PostgreSQL
Hotsos 2017 - Protect or Perform by Paul G. Matuszyk
Postgresql Database Administration Basic - Day1
MySQL Audit using Percona audit plugin and ELK
Beefataque
9.1 Mystery Tour
adding_os_command_capability_to_plsql_with_java_stored_procedures
Mongodb replication
Tutorial all pp_pg_admin_backup_restore
Enable archivelod mode in oracle rac12cR1 with asm location
Create manula and automaticly database
PL/SQL Unit Testing Can Be Fun
Config BuildConfig
Ad

Viewers also liked (6)

PPS
Biarritz
PDF
GSCL2013.A Study of Chinese Word Segmentation Based on the Characteristics of...
PDF
ACL-WMT2013.A Description of Tunable Machine Translation Evaluation Systems i...
PDF
Pptphrase tagset mapping for french and english treebanks and its application...
PDF
The Reasonable Arrangement of Beds in the Ophthalmology Hospital (眼科医院病床合理安排的...
PDF
GSCL2013.Phrase Tagset Mapping for French and English Treebanks and Its Appli...
Biarritz
GSCL2013.A Study of Chinese Word Segmentation Based on the Characteristics of...
ACL-WMT2013.A Description of Tunable Machine Translation Evaluation Systems i...
Pptphrase tagset mapping for french and english treebanks and its application...
The Reasonable Arrangement of Beds in the Ophthalmology Hospital (眼科医院病床合理安排的...
GSCL2013.Phrase Tagset Mapping for French and English Treebanks and Its Appli...
Ad

Similar to Windows 7 64 java envirenment build (20)

PDF
Introduction to Apache Ant
PDF
Gradleintroduction 111010130329-phpapp01
PDF
Gradle Introduction
DOCX
Ordering System IP2buildclasses.netbeans_automatic_buildO.docx
PPTX
Apache ant
PDF
(2) c sharp introduction_basics_part_i
PDF
10 Cool Facts about Gradle
PPTX
DOCX
Instalacion ambiente web am en linux red hat
PDF
GeeCON 2017 - TestContainers. Integration testing without the hassle
PDF
Workshop 3: JavaScript build tools
PPTX
ExtraFileIO.pptx
PDF
OSGi framework overview
PDF
Testing Distributed Micro Services. Agile Testing Days 2017
PPTX
Backbase CXP Manager Setup
PDF
Organizing Machine Learning Projects - Repository Organization
PPT
Introduction To Ant
DOC
Oracle applications 11i hot backup cloning with rapid clone
DOCX
stateDatabuild.xml Builds, tests, and runs the project.docx
PDF
Having Fun with Play
Introduction to Apache Ant
Gradleintroduction 111010130329-phpapp01
Gradle Introduction
Ordering System IP2buildclasses.netbeans_automatic_buildO.docx
Apache ant
(2) c sharp introduction_basics_part_i
10 Cool Facts about Gradle
Instalacion ambiente web am en linux red hat
GeeCON 2017 - TestContainers. Integration testing without the hassle
Workshop 3: JavaScript build tools
ExtraFileIO.pptx
OSGi framework overview
Testing Distributed Micro Services. Agile Testing Days 2017
Backbase CXP Manager Setup
Organizing Machine Learning Projects - Repository Organization
Introduction To Ant
Oracle applications 11i hot backup cloning with rapid clone
stateDatabuild.xml Builds, tests, and runs the project.docx
Having Fun with Play

More from Lifeng (Aaron) Han (20)

PDF
WMT2022 Biomedical MT PPT: Logrus Global and Uni Manchester
PDF
Measuring Uncertainty in Translation Quality Evaluation (TQE)
PDF
Meta-Evaluation of Translation Evaluation Methods: a systematic up-to-date ov...
PDF
HOPE: A Task-Oriented and Human-Centric Evaluation Framework Using Profession...
PDF
HOPE: A Task-Oriented and Human-Centric Evaluation Framework Using Professio...
PDF
Meta-evaluation of machine translation evaluation methods
PDF
Monte Carlo Modelling of Confidence Intervals in Translation Quality Evaluati...
PDF
Apply chinese radicals into neural machine translation: deeper than character...
PDF
cushLEPOR uses LABSE distilled knowledge to improve correlation with human tr...
PDF
Chinese Character Decomposition for Neural MT with Multi-Word Expressions
PDF
Build moses on ubuntu (64 bit) system in virtubox recorded by aaron _v2longer
PDF
Detection of Verbal Multi-Word Expressions via Conditional Random Fields with...
PDF
AlphaMWE: Construction of Multilingual Parallel Corpora with MWE Annotations ...
PDF
MultiMWE: Building a Multi-lingual Multi-Word Expression (MWE) Parallel Corpora
PDF
ADAPT Centre and My NLP journey: MT, MTE, QE, MWE, NER, Treebanks, Parsing.
PDF
A deep analysis of Multi-word Expression and Machine Translation
PDF
machine translation evaluation resources and methods: a survey
PDF
Incorporating Chinese Radicals Into Neural Machine Translation: Deeper Than C...
PDF
Chinese Named Entity Recognition with Graph-based Semi-supervised Learning Model
PPTX
Quality Estimation for Machine Translation Using the Joint Method of Evaluati...
WMT2022 Biomedical MT PPT: Logrus Global and Uni Manchester
Measuring Uncertainty in Translation Quality Evaluation (TQE)
Meta-Evaluation of Translation Evaluation Methods: a systematic up-to-date ov...
HOPE: A Task-Oriented and Human-Centric Evaluation Framework Using Profession...
HOPE: A Task-Oriented and Human-Centric Evaluation Framework Using Professio...
Meta-evaluation of machine translation evaluation methods
Monte Carlo Modelling of Confidence Intervals in Translation Quality Evaluati...
Apply chinese radicals into neural machine translation: deeper than character...
cushLEPOR uses LABSE distilled knowledge to improve correlation with human tr...
Chinese Character Decomposition for Neural MT with Multi-Word Expressions
Build moses on ubuntu (64 bit) system in virtubox recorded by aaron _v2longer
Detection of Verbal Multi-Word Expressions via Conditional Random Fields with...
AlphaMWE: Construction of Multilingual Parallel Corpora with MWE Annotations ...
MultiMWE: Building a Multi-lingual Multi-Word Expression (MWE) Parallel Corpora
ADAPT Centre and My NLP journey: MT, MTE, QE, MWE, NER, Treebanks, Parsing.
A deep analysis of Multi-word Expression and Machine Translation
machine translation evaluation resources and methods: a survey
Incorporating Chinese Radicals Into Neural Machine Translation: Deeper Than C...
Chinese Named Entity Recognition with Graph-based Semi-supervised Learning Model
Quality Estimation for Machine Translation Using the Joint Method of Evaluati...

Recently uploaded (20)

PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Electronic commerce courselecture one. Pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
Cloud computing and distributed systems.
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Machine learning based COVID-19 study performance prediction
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Encapsulation theory and applications.pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
Electronic commerce courselecture one. Pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
MYSQL Presentation for SQL database connectivity
Mobile App Security Testing_ A Comprehensive Guide.pdf
Programs and apps: productivity, graphics, security and other tools
Review of recent advances in non-invasive hemoglobin estimation
Spectral efficient network and resource selection model in 5G networks
Cloud computing and distributed systems.
“AI and Expert System Decision Support & Business Intelligence Systems”
Machine learning based COVID-19 study performance prediction
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Per capita expenditure prediction using model stacking based on satellite ima...
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
MIND Revenue Release Quarter 2 2025 Press Release
Unlocking AI with Model Context Protocol (MCP)
Encapsulation theory and applications.pdf

Windows 7 64 java envirenment build

  • 1. Run Berkeley parser on Windows 7 (64bit) & java environment building recorded by Aaron [http://www.linkedin.com/in/aaronhan] 1. Download JDK, JDK is a development environment for building applications, applets, and components using the Java programming language, from “http://www.oracle.com/technetwork/java/javase/downloads/jdk7downloads-1880260.html” 2. Install “jdk-7u45-windows-x64.exe” 3. Configure the environment variables for windows 7 (64-bit). [reference: http://blog.163.com/wutianshui@126/blog/static/1869346220099455 115417/] Go to your computer -> property - > higher system setting -> environment variable
  • 4. New -> Type “classpath” in the variable name, “C:Program FilesJavajdk1.7.0_45libdt.jar;C:Program FilesJava jdk1.7.0_45libtools.jar;.;” in the value of variable. Press the confirm button. New -> Type “java_home” in the variable name, “;C:Program FilesJavajdk1.7.0_45” in the end of previous value of variable. Press the confirm button.
  • 5. Select the “path” variable from the existing list, press edit button, type “;%JAVA_HOME%bin” in the end of the previous value. 4. Build “Hello world” file to test your environment. Go to the desktop, build the file “HelloWorld.java”, put the following content into the file: --------------------------the following hello world java code---------------public class HelloWorld {
  • 6. public static void main(String[] args) { System.out.println("Hello, World"); } } ----------------------------------------------Open the cmd window, type the following code: cd desktop java HelloWorld If it shows the following words, succeed! Begin the new life of java programming? 5. Download Berkeley parser (https://code.google.com/p/berkeleyparser/downloads/list). Download parser file “BerkeleyParser-1.7.jar” Download English grammar file “eng_sm6.gr” 6. Prepare segmented English corpus. In the same directory of the downloaded tools, build an English example file named as “sampleenglish.seg”, and put this sentence “this is a small house .” into this file.
  • 7. 7. Run the Berkeley English parser for the first time. If you put the downloaded file in the directory “E:Berkeley Parser” Goto the “cmd” window, type the following commands. E: cd “Berkeley Parser” java -jar BerkeleyParser-1.7.jar -gr eng_sm6.gr -inputFile sampleenglish.seg -outputFile englishout.txt –render The above command “-render” is to generate the parsed picture. Wait for one moment, then it will generate the files “englishout.txt” and “thisisasmallhouse.png”. In the “englishout.txt” file there is the parsed sentence “( (S (NP (DT this)) (VP (VBZ is) (NP (DT a) (JJ small) (NN house))) (. .)) )”, and in the .png file, there is the parsed picture. =========================================== Train English grammar: Run Berkeley parser using “WSJ” English corpora. The “.mrg” documents contain the fully tagged English sentences while the “.prd” documents do not contain the POS tags of the words. Here we first use the fully tagged “.mrg” documents. Using the following command to training the English grammar: After around 8 hours, it finished the training as below:
  • 8. ### above name is not suitable. It should be “TrainedGramEng.WSJ” instead of TrainedGramChi.CTB7.
  • 9. Above running information shows the default training documents used by the Berkeley.parser. for WSJ corpora are from the document ID number 200 to the ID 2199. The following command can be run, which means that the Berkeley.parser for English WSJ corpora is defaulted for the “.mrg” documents instead of the “.prd” documents. the begging of the running information is as below:
  • 10. Training began from 2013-11-10-16:30; finished at Store the running details of training grammar by the command “command…. > store.file.name” after training finished. ===================================== Testing: [[To the test the performance of a grammar you can use: java -cp berkeleyParser.jar edu.berkeley.nlp.PCFGLA.GrammarTester path <WSJ location> -in <grammar-file>]] the testing command of the trained grammar:
  • 11. The testing score shows that: To record the running details of the testing stage, use the command: ============================================= Another training and testing of English grammar: The command of the training is below: After around xx hours, the training of the grammar finished as below:
  • 12. Export the training record using below command, this will run the training once more, so you can use this command when you begin the training: The testing command: The result shows the scores as below, which are the same values with last testing run: