-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
94 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
{ | ||
"editor.formatOnSave": true, | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
} | ||
"editor.defaultFormatter": "biomejs.biome", | ||
"editor.codeActionsOnSave": { | ||
"source.organizeImports.biome": "explicit", | ||
"quickfix.biome": "explicit" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"$schema": "https://biomejs.dev/schemas/1.7.2/schema.json", | ||
"organizeImports": { | ||
"enabled": true | ||
}, | ||
"linter": { | ||
"enabled": true, | ||
"rules": { | ||
"recommended": true | ||
} | ||
}, | ||
"javascript": { | ||
"formatter": { | ||
"quoteStyle": "single", | ||
"semicolons": "asNeeded" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../common/ake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"name": "@gutenye/ocr-react-native", | ||
"description": "High accurate text detection (OCR) Javascript/Typescript library that runs on Node.js, Browser, and React Native. Based on PaddleOCR and ONNX runtime", | ||
"version": "1.2.1", | ||
"type": "module", | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/gutenye/ocr.git", | ||
"directory": "packages/react-native" | ||
}, | ||
"exports": { | ||
"react-native": "./src/index.ts", | ||
"default": "./build/index.js" | ||
}, | ||
"files": [ | ||
"src", | ||
"build", | ||
"tsconfig.json", | ||
"!**/__tests__" | ||
], | ||
"scripts": { | ||
"prepublishOnly": "./ake build" | ||
}, | ||
"dependencies": { | ||
"@gutenye/ocr-common": "^1.2.0", | ||
"onnxruntime-react-native": "^1.17.3" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { FileUtilsBase } from '@gutenye/ocr-common' | ||
|
||
export class FileUtils extends FileUtilsBase { | ||
static async read(path: string) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { ImageRawBase } from '@gutenye/ocr-common' | ||
import type { ImageRawData, SizeOption, LineImage } from '@gutenye/ocr-common' | ||
|
||
export class ImageRaw extends ImageRawBase { | ||
static async open(path: string): Promise<ImageRaw> {} | ||
|
||
constructor(imageRawData: ImageRawData) { | ||
super(imageRawData) | ||
} | ||
|
||
async write(path: string) {} | ||
|
||
async resize(size: SizeOption) {} | ||
|
||
async drawBox(lineImages: LineImage[]) {} | ||
|
||
async #apply(sharp: sharp.Sharp) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import Ocr, { registerBackend } from '@gutenye/ocr-common' | ||
import { FileUtils } from './FileUtils' | ||
import { ImageRaw } from './ImageRaw' | ||
import { InferenceSession } from 'onnxruntime-react-native' | ||
|
||
registerBackend({ FileUtils, ImageRaw, InferenceSession }) | ||
|
||
export * from '@gutenye/ocr-common' | ||
export default Ocr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../common/tsconfig.build.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../common/tsconfig.json |