haroon-ali-dev / github-app-testing

0 stars 0 forks source link

Testing #1

Open haroon-ali-dev opened 8 months ago

haroon-ali-dev commented 8 months ago

This is a test.

pd-grammar-bot[bot] commented 8 months ago

Total Mistakes: 10

What: Possible spelling mistake found. Where: At the start of school Dora was afrad of her new Teacher. Mrs. Davis seamed n... Replacements: afraid, farad

What: Possible spelling mistake found. Where: ...Mrs. Davis seamed nice, but she had so manny rules for the class to folow. Scare som... Replacements: Manny, many, Mann, Mandy

What: Possible spelling mistake found. Where: ...he had so manny rules for the class to folow. Scare someone to pieces. As the school... Replacements: flow, follow, Foolow, Solow

What: Possible spelling mistake found. Where: ... someone to pieces. As the school year cotinued, Dora begun to understan how the Teache... Replacements: continued

What: Possible spelling mistake found. Where: ...he school year cotinued, Dora begun to understan how the Teacher come up with the rules ... Replacements: understand

What: This phrase is duplicated. You should probably use “the rules” only once. Where: ... understan how the Teacher come up with the rules The rules were their so students would be respec... Replacements: the rules

What: Use a comma before ‘so’ if it connects two independent clauses (unless they are closely connected and short). Where: ... up with the rules The rules were their so students would be respecful of theyselv... Replacements: , so

What: Possible spelling mistake found. Where: ... rules were their so students would be respecful of theyselves and each other. By the en... Replacements: respectful

What: Possible spelling mistake found. Where: ...their so students would be respecful of theyselves and each other. By the end of the year,... Replacements: themselves, they selves

What: Possible spelling mistake found. Where: ...ugh Mrs. Davis was the best Teacher she evere had! Replacements: every, ever, severe, revere

haroon-ali-dev commented 8 months ago

Dummy fixed.pdf

pd-grammar-bot[bot] commented 8 months ago

Total Mistakes: 1

What: This phrase is duplicated. You should probably use “the rules” only once. Where: ...understand how the Teacher come up with the rules The rules were their, so students would be respe... Replacements: the rules

kfklein15 commented 7 months ago

@haroon-ali-dev , sorry for the delay incoming back to you. I was off yesterday, so only got yo all my notes from last weeks chats today. I have talked to some of the volunteers, and here are the changes we propose:

  1. We want to have a total and then a sub-total of the number of mistakes. This will give the trainee and the reviewer an easy overview of how many mistakes. The below is an example only because I wasn't sure what kind of category of mistakes there are.

Total Possible Mistakes: 100

  • Spelling: 40
  • Commas 20
  • Duplication 10
  • Other 20
  1. instead of showing the list of all examples, we should show the 3 first examples of each category. This will help the trainee to have an overview of mistakes - but they should truly check their text again.

  2. We should add this phrase to the automated message: "Use a grammar AI to correct these mistakes."

  3. if the trainee wants the full report of the mistakes, could they download it? "If you want the full report of all the mistakes, click here."

  4. The question about it being PDF and not Doc came up again. Can you explain again why we have this rule? And could we transform a Doc into a PDF, in case they load the incorrect format?

  5. Can we have a thumbs-up or thumbs-down on the comment of the file, depending on the mistakes? For example, less than 3 mistakes is a thumbs-up

  6. Can we run the following test examples, please?

haroon-ali-dev commented 7 months ago

@kfklein15

  1. This depends on LanguageTool's output:
"matches": [
        {
            "message": "This word is normally spelled with a hyphen.",
            "shortMessage": "Compound",
            "replacements": [
                {
                    "value": "long-established"
                }
            ],
            "offset": 72,
            "length": 16,
            "context": {
                "text": "... This is the first paragraph. ● It is a long established fact that a reader. ● It is a long esta...",
                "offset": 43,
                "length": 16
            },
            "sentence": "● It is a long established fact that a reader.",
            "type": {
                "typeName": "Other"
            },
            "rule": {
                "id": "EN_COMPOUNDS_LONG_ESTABLISHED",
                "description": "Hyphenated words: long established",
                "issueType": "misspelling",
                "category": {
                    "id": "MISC",
                    "name": "Miscellaneous"
                }
            },
            "ignoreForIncompleteSentence": false,
            "contextForSureMatch": 0
        }
]

Number of sub-mistakes can only be shown for what LanguageTool shows information about. For example, if it says 'this is a spelling mistake', then we can look for the word 'spelling' in shortMessage and we know we can add 1 to the spelling sub-mistakes count.

  1. Yes this should be possible.
  2. Yes we can do this.
  3. The entire output will need to be uploaded somewhere first. This involves setting up back-end storage, learning how to connect it to the GitHub app and is out of the scope of the work and will also cause the project to take a lot longer and cost more. It's not a small task.
  4. We had decided on PDF because it looked like it was easier to work with in code, such as easier to extract text from using JavaScript packages. Some of the advice I was given from my CYF mentor. Getting PDFs to work or Docs to work are two completely separate bits of work. There doesn't seem to be an easy way such as just one package that we can use to extract text cleanly from both formats. I got stuck for a long time with just the one package I am using to extract text from the PDF files because you have to do certain things to make sure text is getting extracted properly. And also, this is like number 4, transforming a Doc into a PDF involves searching for packages that we can use to do it then learning them and doing RnD and getting stuck for a long time because text isn't being extracted properly. Will add a lot more time to the project and more cost. It's not a small task.
  5. Yes we can use those web emojis for this.
  6. I will run these soon.
kfklein15 commented 7 months ago

Thanks, @haroon-ali-dev. This is a helpful explanation and glad we can most of the things we are asking for.

haroon-ali-dev commented 7 months ago

PD.Feedback.and.Code.Review.pdf

pd-grammar-bot[bot] commented 7 months ago

Total Mistakes Identified: 2

What: This phrase is duplicated. You should probably use “Code Review” only once. Where: [PD] Feedback and Code Review Code review is probably one of the most important t... Replacements: Code Review

What: “Gotten” is commonly used in American English. For varieties outside of North America, “got” is the preferred variant. Where: ... a few things and I thought that I had gotten everything right and until I actually g... Replacements: got

haroon-ali-dev commented 7 months ago

Professional.skills.research.CYF.pdf

haroon-ali-dev commented 7 months ago

Professional.skills.research.CYF.pdf

pd-grammar-bot[bot] commented 7 months ago

Total Mistakes Identified: 6

What: Possible spelling mistake found. Where: ...ated testing ● Code Maintainability ● Collabor ation and communication ● Client satisfactio... Replacements: Collaboration

What: Possible spelling mistake found. Where: ...skills: ● User Research ● Information Architectur e ● Wireframing and Prototyping using Fi... Replacements: Architecture

What: Possible spelling mistake found. Where: ...eraction Design ● Usability testing ● Collabor ation - Testers : A software tester is a p... Replacements: Collaboration

What: Possible spelling mistake found. Where: ...te effectively with a variety of their staf f. This allows them to get buy-in for the... Replacements: staff, staff f, star f, stay f

What: Possible spelling mistake found. Where: ...e product is developed in a timely and cost-ef fective manner . - Scrum Masters: scrum maste... Replacements: cost-effective

What: Don’t put a space before the full stop. Where: ...d in a timely and cost-ef fective manner . - Scrum Masters: scrum master helps t... Replacements: .

haroon-ali-dev commented 7 months ago

@kfklein15 I tested with those two PDFs and those are the results. It's not detecting the comma mistake with the first PDF and it detected 6 out of 10 mistakes for the second PDF.

kfklein15 commented 7 months ago

HmmmHi @haroon-ali-dev , looking at the last file I cannot find the Collaboration and Architecture errors in the file. And it is missing some important mistakes, for example, individual that learns = individual who learns. Can you check why this is happening, please?

haroon-ali-dev commented 7 months ago

@kfklein15 For the mistakes that it's showing, it looks like the JavaScript PDF package is adding spaces in text for this PDF for some reason. Not sure why it's happening with this one and not with the others. I'll have a look soon.

For the mistake it didn't find, that's probably the limitation of the free version. Maybe someone at CYF should contact LanguageTool and see if they can give a free paid version to CYF?

kfklein15 commented 7 months ago

Thanks, Haroon. How can we be sure it's the limitation of the free version? Could you check with the LanguageTool team?

I can write to them and ask for the freebie, but I would prefer doing so by knowing it would actually make a difference :)

On Thu, 29 Feb 2024 at 19:42, Haroon Ali @.***> wrote:

@kfklein15 https://github.com/kfklein15 For the mistakes that it's showing, it looks like the JavaScript PDF package is adding spaces in text for this PDF for some reason. Not sure why it's happening with this one and not with the others. I'll have a look soon.

For the mistake it didn't find, that's probably the limitation of the free version. Maybe someone at CYF should contact LanguageTool and see if they can give a free paid version to CYF?

— Reply to this email directly, view it on GitHub https://github.com/haroon-ali-dev/github-app-testing/issues/1#issuecomment-1971836731, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATENXAQSSK7PJJHZCG33NHDYV6CA3AVCNFSM6AAAAABCAMFXX6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZRHAZTMNZTGE . You are receiving this because you were mentioned.Message ID: @.***>

haroon-ali-dev commented 7 months ago

image The Grammar & Punctuation section of the premium features on https://languagetool.org/premium_new show that it is indeed due to the limitations of the free version.

Have a look at the other premium features, I think we should really use it. Maybe they will give us a freebie or maybe not. But I honestly think that if they don't, it's really worth paying the £99 every 2 years due to the benefit.

kfklein15 commented 7 months ago

Hi @haroon-ali-dev , we won't get the API for free and the cost isn't as cheap as we originally thought: https://languagetool.org/proofreading-api

So let's move forward with the simple version and try to achieve as much as possible what we want, considering this constraint.

haroon-ali-dev commented 7 months ago

Oh so that's the link for the API pricing. It wasn't clear in their UI. Alright then. Also, we will need to switch to .docx files because the current PDF extraction package is not extracting the text properly but I managed to find one that does but it works for .docx files only.

kfklein15 commented 7 months ago

It wasn't clear at all. They sent it to me.

Docs file is ok.

kfklein15 commented 6 months ago

Professional skills research (CYF).docx

Personal statement - test.docx

How is proficient in English defined_ - Test.docx

@haroon-ali-dev , I am adding the 3 files here.

haroon-ali-dev commented 6 months ago

How.is.proficient.in.English.defined_.-.Test.docx

pd-grammar-bot[bot] commented 6 months ago

👎 Total Possible Mistakes: 3

Capitalization

What: This sentence does not start with an uppercase letter. Where: ...he lowest level we can work with is B1. fundamentals includes another English test. B2 To ...

Possible Typo

What: Possible spelling mistake found. Where: ...hy did we make this rule? We set these levls because people without this level of En...

Collocations

What: The usual verb for “courses” in a school is “take” or “attend”, not “follow”. Where: ...le without this level of English cannot follow our courses. We want you to do well. It is better t...

Use a Grammar AI to fix these mistakes.

haroon-ali-dev commented 6 months ago

Personal.statement.-.test.docx

pd-grammar-bot[bot] commented 6 months ago

👎 Total Possible Mistakes: 10

Grammar

What: Possible agreement error -- use the past participle here. Where: I have big dream to becum software developer. I have alw...

What: If ‘learn’ is used as a verb, it usually requires the infinitive. Where: ...cation. Now I am in UK, I want to learn coding so I can get good job and provide for m...

Possible Typo

What: Possible spelling mistake found. Where: I have big dream to becum software developer. I have always been ...

What: Possible spelling mistake found. Where: ... software developer. I have always been interseted in computers and technology, but in my ...

What: Possible spelling mistake found. Where: ...chnology, but in my country it was very dificult to get education. Now I am in UK, I wan...

Punctuation

What: Use a comma before ‘so’ if it connects two independent clauses (unless they are closely connected and short). Where: .... Now I am in UK, I want to learn coding so I can get good job and provide for my f...

Use a Grammar AI to fix these mistakes.

haroon-ali-dev commented 6 months ago

Professional.skills.research.CYF.docx

pd-grammar-bot[bot] commented 6 months ago

👎 Total Possible Mistakes: 4

Capitalization

What: This sentence does not start with an uppercase letter. Where: ...ication does what it is supposed to do. the benefits of testing include preventing ...

What: This sentence does not start with an uppercase letter. Where: ...f the product owners/managers' skills: a clear vision for the product. This requ...

What: This sentence does not start with an uppercase letter. Where: ...ost-effective manner. Scrum Masters: scrum master helps to facilitate scrum to the...

Possible Typo

What: Possible spelling mistake found. Where: ...bility to follow procedures, during the tst process. Attention to detail, in orde...

Use a Grammar AI to fix these mistakes.

haroon-ali-dev commented 6 months ago

@kfklein15 All 3 files have been uploaded. Please have a look. Thanks.

kfklein15 commented 6 months ago

Hi @haroon-ali-dev , can we change the American spelling to British spelling by any chance? That's one of our main feedbacks to the trainees? Capitalization should be capitalisation.

Also, does that mean the whole grammar check is being done using American English?

haroon-ali-dev commented 6 months ago

@kfklein15 The API response is in American English but the checking is not. The checking is set to 'en-GB'. I just tested misspelling capitalisssation and it gave me me the suggestion as capitalisation. If I switch to 'en-US' then it gives capitalization as a suggestion. But the entire API response such as category names are all in American English and it seems that only the Capitalization category name is the problem so what I can do is change it to Capitalisation in the code.

kfklein15 commented 6 months ago

Sounds great! Thanks, @haroon-ali-dev . I'll just share this with the CW volunteers and we'll get back to you hopefully by tomorrow.

kfklein15 commented 6 months ago

Stupid question: how will the bot be linked only to the issues from the trainees, rather than any issue?

haroon-ali-dev commented 6 months ago

The bot has to be installed on repos. The bot will belong to the CYF GitHub organization with a link available that can be placed in coursework issue instruction text. After the trainee has forked the repo they can click that link and install the app. From that point every issue comment that has a .docx file uploaded inside it for the trainee's repo will trigger the bot.

kfklein15 commented 6 months ago

Thanks, @haroon-ali-dev .

  1. So it has to be installed on the trainees repo - not our CYF Coursework repo, correct?
  2. Can you please show the updated Capitalization to Capitalisation change?
haroon-ali-dev commented 6 months ago

How.is.proficient.in.English.defined_.-.Test.docx

pd-grammar-bot[bot] commented 6 months ago

👎 Total Possible Mistakes: 3

Capitalisation

What: This sentence does not start with an uppercase letter. Where: ...he lowest level we can work with is B1. fundamentals includes another English test. B2 To ...

Possible Typo

What: Possible spelling mistake found. Where: ...hy did we make this rule? We set these levls because people without this level of En...

Collocations

What: The usual verb for “courses” in a school is “take” or “attend”, not “follow”. Where: ...le without this level of English cannot follow our courses. We want you to do well. It is better t...

Use a Grammar AI to fix these mistakes.

haroon-ali-dev commented 6 months ago

@kfklein15

  1. Yes it is only installed on the trainee repo.
  2. There you go.
kfklein15 commented 6 months ago

Fantastic. All approved. Could you build a short step-by-step (similar to user guide) of how the trainees should use it?

haroon-ali-dev commented 6 months ago

Yes but I'll have to leave it till post-deployment. We need to first deploy everything then test everything by forking an actual CYF repo that contains PD coursework and place the link for the GitHub app (to install it) in the instructions and then see if everything works.