-
Notifications
You must be signed in to change notification settings - Fork 3
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
JSON for integrating with new frontend #99
Comments
Basic view[ @funderburkjim, |
Advanced viewbasicView here means a block of data as defined above [ |
List viewSame as advanced view |
Good evening! I like suggested format and have a question about fields mapping. The data source is xml. I have dowdloaded mw.xml from I get one record from xml:
110
akAra
3
a--kAra
m. the_letter_or_sound
|
@funderburkjim any thoughts? |
Please take a look at the example mentioned in this comment. This already existent api may suffice for many You've ignored the paremeters to SEND to the api. These include dictionary code, input format (how headword is spelled), output format (how Devanagari is rendered in returned html), accent (whether to include accents in returned html). Should the parameters sent to the server also be part of the in the 'list02php' example, the returned html already bundles lnum and pglink. I don't know what 'pgpart' is supposed to represent. What is sent to api should probably also include a 'type' - meaning what kind of information is required back. I think we should focus on the basic display first - the advanced search display (webtc2) has many more issues to deal with. |
Right. |
I've read 'Learning React' by Kirupa book website , There seems to be a lot to like about ReactJS for writing user interfaces - the thing I like best so far However, one thing that I'm finding to be a stumbling block is the development of slightly complex It seems that it would be quite complex to develop a similar React component. I see that there is 'https://github.com/reactjs/react-autocomplete' , so would that be the way to go? In general, the question is are there good off-the-shelf React alternatives to most of the JQuery-UI solutions? Also, I haven't yet seen examples of using Ajax calls with ReactJS -- what is a good source for this? Is this where Redux comes in? @juhnowski - What are your thoughts on this? |
So we can't keep that as it is? |
From my reading, it is not a good idea to mix jQuery with React (google 'React jQuery'). The reason is that jQuery deals directly with the DOM, while React maintains its own 'virtual DOM' from which it renders the real DOM. That's my current understanding . |
Oh, ok. I would not worry much about it, before @juhnowski actually starts coding with it. He seems to be quite busy again, so let him tell his plans and let's not worry ahead. |
Sounds like good suggestion. |
Related to #117. |
Good evening. Lately I was not engaged in coding because of studying of language. I studied 1/3 of my textbook and I feel that I am ready to start coding more advanced... |
@juhnowski it's time to finish the easy spell module. |
Yes. |
@juhnowski If that was a programming language textbook, which book? |
No, it's Sanskrit textbook, https://yadi.sk/i/ceve0IVgza7yT |
@funderburkjim Hello, it was Sanskrit. |
Goodnight. I finished the initial "search".
|
That's great and more than enough. UIs can come and go, functionality remains.
I would go for it. @funderburkjim what about the rest?
I guess it's not possible, so if Jim will have all he needs on github, he can upload it (and only he) to Cologne via ssh. |
@gasyoun I guess it's not possible, so if Jim will have all he needs on github, he can upload it (and only he) to Cologne via ssh.
Following files should be placed in some test folder in server (other files - for testing):
|
@juhnowski sure, let's see what @funderburkjim will tell. For me, it's the number one most wanted feature that I miss every day for many years. See https://github.com/sanskrit/sanscript.js - does it makes any sense for how to code |
Good night. I wrote the offline version. I pursued two aims: the first - to test an algorithm of online version , the second - it will be possible to use as the separate program to lower load of the web server. Repositories: @funderburkjim I apologize for not having answered the questions since April 11th. In general, the question is are there good off-the-shelf React alternatives to most of the JQuery-UI solutions? - yes, I think, that there are all we needed. I have examples of successful implementation of complex interprise applications on the React. Also, I haven't yet seen examples of using Ajax calls with ReactJS - ajax calls is deprecated method of requesting data. Now more advanced - fetch. On my point of view, Redux is a more template, best practice then framework. The essence is everytime make new copy of data (immutable) and contol all states of application in one data structure. React has an extension React Native - for mobile, and may be more fast than jQuery. |
@gasyoun https://github.com/sanskrit/sanscript.js interesting |
Thanks for the hint.
Fully agree, same doubts on my end. We need to change, but what to use - is an open question. |
This is not going to be possible. If all you need is a node.js server, why not use gomix - now called glitch ? You can get a free account with Github user. I also noticed today that they make provision for persistent data (in a .data directory), e.g. in form of sqlite database, which you mentioned. Since project containers seem to be built on node.js, glitch sounds like it might fit your needs. Check this out. If it doesn't work for you, let me know. |
While I can upload the repository (sanskrit-simple-search) to Cologne, it won't be executable, because node.js is not present there. Possibly it could be modified to use Babel and other javascript libraries available by CDN. But if it definitely requires node.js on the server, then it won't work on Cologne server. |
@funderburkjim goodnight! node.js - for local tests. |
@juhnowski Hi. What if I put those four files (fetching ... word_frequency) on github pages ? |
I guess here come Jim's pythons.
|
In my fetching version I had
It returns Html for EVERY key suggestion sent.
This should be one that @juhnowski can work on. The one on my funderburk.github.io repository is
|
The word generation logic has to make some assumption about how Sanskrit words are spelled. It probably doesn't matter much which assumption (HK, SLP1, etc.) is made. But once made, all the Based on my limited understanding of the work @juhnowski and @gasyoun have done on this algorithm, you have been assuming the Sanskrit words are spelled with the HK transliteration. So stick with HK for char tables, etc. One suggestion on code organization: Make a separate spellgen.js (or whatever name you think best) file and have this file contain all the code for generating the 'res' array of spelling possibilities. That way, it will be easier for others to follow the |
Another thought -- put 'sanskrit-simple-search' as a folder within 'sanskrit-lexicon.github.io' repository.
|
Sure? So why is प्रण above प्राण in
So
I agree, let HK be the basis. |
Although the HK and SLP1 transliterations are mostly equally good transliterations for Sanskrit, there are
So, if your algorithms are still at an early stage of program representation, it might make sense to |
I am only stating that word_frequency.js is now present in my testing directory, and is loaded. Whether my changes to the Javascript interfere with the usage of word_frequency, I don't know. If the original code needs to parse the results from Cologne server before it uses the word_frequency However, it would seem that the ordering of the keys by word_frequency could occur BEFORE the list of keys is sent to Cologne server. |
HK is widely used on web. SLP1 only on Cologne server. I'm for SLP1 as programming background but seems @juhnowski gets mixes when he has both. He has not seen the python transliteration scripts @funderburkjim and I would want to you to make a short intro on how they work and could be used here.
Seems it stopped to work.
@juhnowski is it so? |
@juhnowski Hi! As a result, the way for this idea to proceed is for you to pass the baton to me. As you suspected, further development is best done within the Cologne environment. So your work is done on this project. Thank you, Ilya !! |
@funderburkjim JSON output is what I miss the most. |
https://dicts.uni-koeln.de/ is the closest item in existence. |
This is a huge issue. In refactoring code recently, I've aimed at separating the data retrieval (from xxx.xml) from |
Closest to what? |
Giving JSON output based on Cologne data. |
Please be more specific; tell me some url that currently does not give JSON output but that should give |
Long question. Will have to think and write exhausting / exhaustive notes. |
Let us have a call on Sunday and I'll ask a backend developer to be there and give advice? |
Having comments from an experienced backend developer could be useful. But we need to be more certain of One thing I might be able to do to further the conversation on Json is to review the current codebase
with attention to
Such a review useful? Then we can compare the current situation with good API models, such as
|
@funderburkjim maybe let's plan a call with them, so we exchange our thoughts on APIs? |
I must say that the largest bottleneck is @gasyoun 's insistence for incomprehensibly short URLs. Once he agrees to a URL, implementing would be a small item. So, calling would not help. |
https://github.com/sanskrit-lexicon/COLOGNE/tree/master/api is the place where we can do this review. Three sample URLs listed. A comment can be posted in #322 whenever a new API is documented. |
sanskrit-lexicon/MWS#37 has @juhnowski's proposal to segregate backend and frontend into separate parts with RESTful API with JSON as intermediary.
This issue is devoted to suggest and discuss formats for basic, list and advanced views of dictionaries.
The text was updated successfully, but these errors were encountered: