Skip to content

Conversation

@davearlin
Copy link
Contributor

@davearlin davearlin commented Jun 14, 2023

Motivation and Context

Extends the copilot-chat-app (https://github.com/microsoft/semantic-kernel/tree/9ba5c6b044e9697393e34129acf383c19b786d60/samples/apps/copilot-chat-app) sample to allow for importing images with text using the Tesseract library (https://github.com/charlesw/tesseract/)

Issue: [Support Tesseract / OCR in Copilot Example #1440]

Description

Added a new "Tesseract" section within appsettings.json to specify Tesseract language file (eg: eng)
Added corresponding TesseractOptions class and set up appropriate DI for use within the DocumentImportController.
Added appropriate file extension mappings for common rasterized image formats: png, jpg, tiff.
Updated frontend Web App to default to allowing these file extensions when selecting the File Import (paper clip icon) button.
Added content to README.md within the webapi to explain usage.

Contribution Checklist

@davearlin
Copy link
Contributor Author

@microsoft-github-policy-service agree

@teresaqhoang teresaqhoang added the PR: feedback to address Waiting for PR owner to address comments/questions label Jun 19, 2023
@davearlin davearlin requested a review from a team as a code owner June 25, 2023 20:11
@madsbolaris madsbolaris assigned gitri-ms and unassigned teresaqhoang Jun 27, 2023
@shawncal shawncal changed the title Feature/tesseract ocr copilot chat Issue #1440 Copilot Chat: Feature/tesseract ocr Issue #1440 Jun 29, 2023
davearlin and others added 3 commits June 29, 2023 20:54
Remove TesseractOptions as this is no longer needed.
Use a NullTesseractEngine if a language file isn't found or installed.
@TaoChenOSU
Copy link
Contributor

TaoChenOSU commented Jul 10, 2023

@TaoChenOSU TaoChenOSU added PR: ready for review All feedback addressed, ready for reviews and removed PR: feedback to address Waiting for PR owner to address comments/questions labels Jul 10, 2023
@gitri-ms gitri-ms added this pull request to the merge queue Jul 12, 2023
Merged via the queue into microsoft:main with commit 089ba8f Jul 12, 2023
@davearlin davearlin deleted the feature/tesseract_ocr_copilot_chat branch July 15, 2023 15:17
piotrek-appstream pushed a commit to Appstream-Studio/semantic-kernel that referenced this pull request Jul 19, 2023
)

### Motivation and Context
<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to? 
4. If it fixes an open issue, please link to the issue here.
(microsoft#1440)
-->
Extends the `copilot-chat-app`
(https://github.com/microsoft/semantic-kernel/tree/9ba5c6b044e9697393e34129acf383c19b786d60/samples/apps/copilot-chat-app)
sample to allow for importing images with text using the Tesseract
library (https://github.com/charlesw/tesseract/)

Issue:  [Support Tesseract / OCR in Copilot Example microsoft#1440] 

### Description
<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

Added a new "Tesseract" section within `appsettings.json` to specify
Tesseract language file (eg: eng)
Added corresponding `TesseractOptions` class and set up appropriate DI
for use within the `DocumentImportController`.
Added appropriate file extension mappings for common rasterized image
formats: `png`, `jpg`, `tiff`.
Updated frontend Web App to default to allowing these file extensions
when selecting the File Import (paper clip icon) button.
Added content to README.md within the `webapi` to explain usage.

### Contribution Checklist
<!-- Before submitting this PR, please make sure: -->
- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows SK Contribution Guidelines
(https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
- [ ] The code follows the .NET coding conventions
(https://learn.microsoft.com/dotnet/csharp/fundamentals/coding-style/coding-conventions)
verified with `dotnet format`
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄

---------

Co-authored-by: Gina Triolo <51341242+gitri-ms@users.noreply.github.com>
Co-authored-by: Tao Chen <TaoChenOSU@users.noreply.github.com>
golden-aries pushed a commit to golden-aries/semantic-kernel that referenced this pull request Oct 10, 2023
)

### Motivation and Context
<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to? 
4. If it fixes an open issue, please link to the issue here.
(microsoft#1440)
-->
Extends the `copilot-chat-app`
(https://github.com/microsoft/semantic-kernel/tree/9ba5c6b044e9697393e34129acf383c19b786d60/samples/apps/copilot-chat-app)
sample to allow for importing images with text using the Tesseract
library (https://github.com/charlesw/tesseract/)

Issue:  [Support Tesseract / OCR in Copilot Example microsoft#1440] 

### Description
<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

Added a new "Tesseract" section within `appsettings.json` to specify
Tesseract language file (eg: eng)
Added corresponding `TesseractOptions` class and set up appropriate DI
for use within the `DocumentImportController`.
Added appropriate file extension mappings for common rasterized image
formats: `png`, `jpg`, `tiff`.
Updated frontend Web App to default to allowing these file extensions
when selecting the File Import (paper clip icon) button.
Added content to README.md within the `webapi` to explain usage.

### Contribution Checklist
<!-- Before submitting this PR, please make sure: -->
- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows SK Contribution Guidelines
(https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
- [ ] The code follows the .NET coding conventions
(https://learn.microsoft.com/dotnet/csharp/fundamentals/coding-style/coding-conventions)
verified with `dotnet format`
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄

---------

Co-authored-by: Gina Triolo <51341242+gitri-ms@users.noreply.github.com>
Co-authored-by: Tao Chen <TaoChenOSU@users.noreply.github.com>
johnoliver pushed a commit to johnoliver/semantic-kernel that referenced this pull request Jun 5, 2024
)

### Motivation and Context
<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to? 
4. If it fixes an open issue, please link to the issue here.
(microsoft#1440)
-->
Extends the `copilot-chat-app`
(https://github.com/microsoft/semantic-kernel/tree/9ba5c6b044e9697393e34129acf383c19b786d60/samples/apps/copilot-chat-app)
sample to allow for importing images with text using the Tesseract
library (https://github.com/charlesw/tesseract/)

Issue:  [Support Tesseract / OCR in Copilot Example microsoft#1440] 

### Description
<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

Added a new "Tesseract" section within `appsettings.json` to specify
Tesseract language file (eg: eng)
Added corresponding `TesseractOptions` class and set up appropriate DI
for use within the `DocumentImportController`.
Added appropriate file extension mappings for common rasterized image
formats: `png`, `jpg`, `tiff`.
Updated frontend Web App to default to allowing these file extensions
when selecting the File Import (paper clip icon) button.
Added content to README.md within the `webapi` to explain usage.

### Contribution Checklist
<!-- Before submitting this PR, please make sure: -->
- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows SK Contribution Guidelines
(https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
- [ ] The code follows the .NET coding conventions
(https://learn.microsoft.com/dotnet/csharp/fundamentals/coding-style/coding-conventions)
verified with `dotnet format`
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄

---------

Co-authored-by: Gina Triolo <51341242+gitri-ms@users.noreply.github.com>
Co-authored-by: Tao Chen <TaoChenOSU@users.noreply.github.com>
johnoliver pushed a commit to johnoliver/semantic-kernel that referenced this pull request Jun 5, 2024
)

### Motivation and Context
<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to? 
4. If it fixes an open issue, please link to the issue here.
(microsoft#1440)
-->
Extends the `copilot-chat-app`
(https://github.com/microsoft/semantic-kernel/tree/9ba5c6b044e9697393e34129acf383c19b786d60/samples/apps/copilot-chat-app)
sample to allow for importing images with text using the Tesseract
library (https://github.com/charlesw/tesseract/)

Issue:  [Support Tesseract / OCR in Copilot Example microsoft#1440] 

### Description
<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

Added a new "Tesseract" section within `appsettings.json` to specify
Tesseract language file (eg: eng)
Added corresponding `TesseractOptions` class and set up appropriate DI
for use within the `DocumentImportController`.
Added appropriate file extension mappings for common rasterized image
formats: `png`, `jpg`, `tiff`.
Updated frontend Web App to default to allowing these file extensions
when selecting the File Import (paper clip icon) button.
Added content to README.md within the `webapi` to explain usage.

### Contribution Checklist
<!-- Before submitting this PR, please make sure: -->
- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows SK Contribution Guidelines
(https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
- [ ] The code follows the .NET coding conventions
(https://learn.microsoft.com/dotnet/csharp/fundamentals/coding-style/coding-conventions)
verified with `dotnet format`
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄

---------

Co-authored-by: Gina Triolo <51341242+gitri-ms@users.noreply.github.com>
Co-authored-by: Tao Chen <TaoChenOSU@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs and tests Improvements or additions to documentation PR: ready for review All feedback addressed, ready for reviews

Projects

No open projects

Development

Successfully merging this pull request may close these issues.

6 participants