Skip to content

Commit 430115a

Browse files
updated: readme
1 parent cc19a13 commit 430115a

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

README.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,32 @@
66
[![Coverage Status](https://coveralls.io/repos/github/apertium/apertium-python/badge.svg?branch=master)](https://coveralls.io/github/apertium/apertium-python?branch=master)
77

88
## Introduction
9-
- The code-base is in development for the Gsoc '18 project called **Apertium API in Python**
9+
- The code-base is in development for the GSoC '19 project called **Apertium API in Python**
1010
- The Apertium core modules are written in C++.
1111
- This project is an attempt to make the Apertium modules available in python, which because of it's simplicity is more appealing to users.
1212

1313
## About the Exisiting Code Base
14-
- The exisiting code base has the subprocess implementation of the basic functions of Apertium.
15-
- A branch called the ```windows``` has the implementation for the ```windows``` support and will soon be available on master. Detailed instructions can be found [here](https://gist.github.com/arghyatiger/c8aab476022158f4bdb3dbe45308cdb4)
14+
- The exisiting code base has the subprocess and swig wrapper implementation of the basic functions of Apertium.
1615

17-
## Major things to do
18-
- Subprocess implementation of the C++ functions in Apertium. To make the wrapper thinner.
19-
- Other small issues can be found [here](https://github.com/apertium/apertium-python/issues)
16+
## ToDo
17+
- ToDo is present in form of issues https://github.com/apertium/apertium-python/issues
2018

2119
## Usage of library
2220

21+
- For multiple invocations `Method 1` is more performant, as the dictionary needs to be loaded only once.
22+
2323
### Analysis
2424
Performing Morphological Analysis
2525

26-
Method 1: One can create ```Analyzer``` objects on which ```analyze()``` function can be run.
27-
```python
26+
Method 1: Create `Analyzer` object and call its `analyze()` method.
27+
```
2828
In [1]: import apertium
2929
In [2]: a = apertium.Analyzer('en')
3030
In [3]: a.analyze('cats')
3131
Out[3]: [cats/cat<n><pl>, ./.<sent>]
3232
```
33-
Method 2: Alternatively, the library provides an option to directly run the ```analyze``` method.
34-
```python
33+
Method 2: Calling `analyze` method directly.
34+
```
3535
In [1]: import apertium
3636
In [2]: apertium.analyze('en', 'cats')
3737
Out[2]: cats/cat<n><pl>
@@ -40,52 +40,52 @@ Out[2]: cats/cat<n><pl>
4040
### Generation
4141
Performing Morphological Generation
4242

43-
Method 1: Just like the ```Analyzer```, One can create ```Generator``` objects on which ```generate()``` function can be run.
44-
```python
43+
Method 1: Create `Generator` and call its `generate()` method.
44+
```
4545
In [1]: import apertium
4646
In [2]: g = apertium.Generator('en')
4747
In [3]: g.generate('^cat<n><pl>$')
4848
Out[3]: 'cats'
4949
```
50-
Method 2: Running ```generate()``` directly.
51-
```python
50+
Method 2: Calling `generate()` directly.
51+
```
5252
In [1]: import apertium
5353
In [2]: apertium.generate('en', '^cat<n><pl>$')
5454
Out[2]: 'cats'
5555
```
5656

5757
### Installing more modes from other language data
5858
One can also install modes by providing the path to the lang-data using this simple function
59-
```python
59+
```
6060
In [1]: import apertium
6161
In [2]: apertium.append_pair_path('..')
6262
```
6363

6464
### Tagger
65-
Method 1: One can create ```Tagger``` objects on which ```tag()``` function can be run.
66-
```python
65+
Method 1: Create `Tagger` object and call its `tag` method.
66+
```
6767
In [1]: import apertium
6868
In [2]: tagger = apertium.Tagger('eng')
6969
In [3]: tagger.tag('cats')
7070
Out[3]: [cats/cat<n><pl>]
7171
```
72-
Method 2: Running ```tag()``` directly.
73-
```python
72+
Method 2: Calling `tag()` directly.
73+
```
7474
In [1]: import apertium
7575
In [2]: apertium.tag('en', 'cats')
7676
Out[2]: [cats/cat<n><pl>]
7777
```
7878

7979
### Translation
80-
Method 1: One can create ```Translator``` objects on which ```translate()``` function can be run.
81-
```python
80+
Method 1: Create `Translator` object and call its `translate()` method.
81+
```
8282
In [1]: import apertium
8383
In [2]: t = apertium.Translator('eng', 'spa')
8484
In [3]: t.translate('cats')
8585
Out[3]: 'Gatos'
8686
```
87-
Method 2: Running ```translate()``` directly.
88-
```python
87+
Method 2: Calling `translate()` directly.
88+
```
8989
In [1]: import apertium
9090
In [2]: apertium.translate('en', 'spa', 'cats')
9191
Out[2]: 'Gatos'

0 commit comments

Comments
 (0)