NewcastleRSE / nhs_readability_react

ReactJS version of the NHS Document Readability project based on MUI-rte
1 stars 0 forks source link

Include medical terms in reading age scores not applied #42

Open rosselton opened 1 year ago

rosselton commented 1 year ago

This switch affects Smog Index, not the Flesch Kincaid so changes are not reflected in the UK reading age calculation.

rosselton commented 1 year ago

@nicoleahmed @ldawson13

Ive written a new function for this, which seem to work but is the basic calculation going to be the same?

     smog = this._roundFloat(1.043 * (30 * (nPolySyllables / this.nSentences)) ** 0.5 + 3.1291, 1);

Im reluctant to release the fix unless I know that this is still the correct adjustment when using FK instead of using smog.

If that still ok, I'll get that deployed today. thanks!

rosselton commented 1 year ago

Deployed as seems to work and better than a broken switch. Adjustments will need to be made to the calculation if not correct.

nicoleahmed commented 1 year ago

Hey Becky - tested this morning with some text from this here

the switch seems to be working for me

Is the question about which formula to use? I wasn't involved with the code development for the initial switch, so I'm not sure how medical words are being identified --- but I would imagine that FK would be the calculation mode pre and post exclusion of medical words... if that was the question?

working well

rosselton commented 1 year ago

@nicoleahmed Thanks Nicole for testing! I agree, it seems to work ok, but my question was really about the calculation. I'll ask David about it though.

ldawson13 commented 1 year ago

This seems to be the way to calculate the FKGL

image