Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V9: Links page capitalization #356

Open
ivan-kuzma-scx opened this issue Apr 28, 2020 · 3 comments
Open

V9: Links page capitalization #356

ivan-kuzma-scx opened this issue Apr 28, 2020 · 3 comments
Labels
Projects

Comments

@ivan-kuzma-scx
Copy link

Hello @spencermountain, it seems that after upgrading to new package version links are showing different first character capitalization.

For example topic Apple and it's 208th sentence.

doc.sentences(208).json();

For example, a link pointing to Food browning has capitalized page property, while others don't. On the wiki page they all pointing to capitalized pages.

0: Object {text: "enzyme", type: "internal", page: "enzyme"}
1: Object {text: "polyphenol oxidase", type: "internal", page: "polyphenol oxidase"}
2: Object {text: "browning", type: "internal", page: "Food browning"}
3: Object {text: "catalyzing", type: "internal", page: "catalysis"}
4: Object {text: "oxidation", type: "internal", page: "redox"}
5: Object {text: "o-quinones", type: "internal", page: "o-quinone"}

Could you please take a look

@spencermountain
Copy link
Owner

hey, sorry about that. This did change in 8.0.0 and was buried in here

If it helps, in wikipedia all pages are titlecased. If I can remember, this was done to simplify some of the text-output code. Maybe .json() should titlecase them, maybe .page() should titlecase them? I'm not sure. If anyone has any strong feelings one way or the other, let me know.

@ivan-kuzma-scx
Copy link
Author

Thanks for the quick response and idea with tittlecasing.
Have tryied it, but found a mismatch in link.page when it contains more than 1 word.

For example topic Milwaukee Bucks, and it's doc.sentences(133).json();

Object { text: "2001" type: "internal" page: "2001 NBA Playoffs" }.

Actual page is 2001 NBA playoffs with lower first character in playoffs word.

@spencermountain
Copy link
Owner

agh, yeah you're right.
shoot. I never thought of that.
This will probably have to be added to a major release.

@spencermountain spencermountain added this to To do in v9 May 11, 2020
@spencermountain spencermountain changed the title Links.page capitalization V9: Links page capitalization Dec 29, 2020
@spencermountain spencermountain moved this from To do to In progress in v9 Apr 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
v9
  
In progress
Development

No branches or pull requests

2 participants