Skip to content

Commit

Permalink
Add chinese simplified (#120)
Browse files Browse the repository at this point in the history
Closing #119
  • Loading branch information
R0Wi authored and github-actions[bot] committed May 21, 2022
1 parent adc51dd commit 471065b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ apt-get install tesseract-ocr-eng

# German
apt-get install tesseract-ocr-deu

# Chinese - Simplified
apt-get install tesseract-ocr-chi-sim
```

## Usage
Expand Down
3 changes: 2 additions & 1 deletion lib/OcrProcessors/PdfOcrProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ class PdfOcrProcessor implements IOcrProcessor {
'it' => 'ita',
'es' => 'spa',
'pt' => 'por',
'ru' => 'rus'
'ru' => 'rus',
'chi' => 'chi_sim'
];

/** @var ICommand */
Expand Down
1 change: 1 addition & 0 deletions src/components/WorkflowOcr.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ const availableLanguages = [
{ label: 'Spanish', langCode: 'es' },
{ label: 'Portuguese', langCode: 'pt' },
{ label: 'Russian', langCode: 'ru' },
{ label: 'Chinese - Simplified', langCode: 'chi' },
]

export default {
Expand Down
4 changes: 2 additions & 2 deletions src/test/components/WorkflowOcr.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ describe('Init tests', () => {
})

describe('Language settings tests', () => {
test('Should have 7 languages available', () => {
test('Should have 8 languages available', () => {
const wrapper = mount(WorkflowOcr)
expect(wrapper.vm.availableLanguages.length).toBe(7)
expect(wrapper.vm.availableLanguages.length).toBe(8)
})

test('Should select one language', () => {
Expand Down

0 comments on commit 471065b

Please sign in to comment.