Added option for users to modify config parameter when calling pytess…
Author: kelvinAI
Pull request: yes

# What does this PR do?

This is a feature addition to LayoutLMV3, a follow up to the same feature added to [LayoutLMV2's feature extractor ](https://github.com/huggingface/transformers/pull/17733)

Giving user option to set config parameter used by Tesseract when performing feature extraction. Eg. to change psm levels while performing transcription by passing in '--psm 10' to config parameter while invoking image_to_data


It is shown that changing the psm values greatly influences the end result of LayoutLMV2/XLM/LMV3, and the specific psm value is different depending on the document formatting. Refer : [PSM](https://github.com/tesseract-ocr/tesseract/issues/434)

```python
pytesseract.image_to_data(image, lang=lang, output_type="dict", config="--psm 10") 
``` 

Users can now set the tesseract config parameter during Processor initialization, like so:
```python
processor = AutoProcessor.from_pretrained("microsoft/layoutlmv3-base", ocr_lang="eng", tesseract_config="--psm 5")
```


## Before submitting
- [❌] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [✔️] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#start-contributing-pull-requests),
      Pull Request section?
- [✔️] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link
      to it if that's the case.
- [✔️] Did you make sure to update the documentation with your changes? Here are the
      [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and
      [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation).
- [❌] Did you write any new necessary tests?

Comments:
_The documentation is not available anymore as the PR was closed or merged._

@NielsRogge 
Added & tested LayoutLMV3 feature extractor

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) are likely to be ignored.

Hmm @kelvinAI for some reason I'm seeing "files changed = 0", did something go wrong here?

Hey @NielsRogge , the changes for this branch have already been merged into [this pr](https://github.com/huggingface/transformers/pull/17733) as discussed earlier. And since that PR have already been merged with main earlier that's probably why it's showing 0 files changed over here. Looking at the autogenerated documentation for [main](https://huggingface.co/docs/transformers/main/en/model_doc/layoutlmv3#transformers.LayoutLMv3FeatureExtractor) it seems that the changes for both LayoutLMv2 and LayoutLMv3 are already included :). Could you please help to verify? 

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) are likely to be ignored.

Yes, so seems like you can close this PR.

Right, forgot to close this :)