Open akprasad opened 2 years ago
Also, I get around 1.8 seconds per verse:
import time
num_trials = 20
start = time.time()
for i, phrase in enumerate([
'Darmakzetre kurukzetre samavetA yuyutsavaH',
'mAmakAH pARqavAScEva kimakurvata saMjaya',
] * num_trials):
resp = api_example(phrase, 'slp1')
end = time.time()
print((end - start) / num_trials)
Is there anything we can do to improve performance here? Ideally I'd like around 100ms per verse.
@akprasad Arun, thanks for reporting this. This is what's going on
Ideally, we should be parsing the entire sentence at a time - Darmakzetre kurukzetre samavetA yuyutsavaH mAmakAH pARqavAScEva kimakurvata saMjaya' to get the correct parse. This is being held up by whatever is holding up 2.
I will post an update after digging further.
'Darmakzetre kurukzetre samavetAH yuyutsavaH kim akurvata saMjaya' now parses correctly, and has been added to the test suite.
This takes roughly 400ms
Hi Arun @akprasad
Can we get on a conf call to discuss this weekend to discuss use modes? (Would be good if @avinashvarna can join too). I can demo the UI to you so you can switch to that (or our command line) from the api.
The flow I have in mind (and which is what our UI does) is a two step process
Parse the sentence with sandhi split.
I would like to understand your perspective on how you see yourself using this.
Sure, let's sync over email.
Minimal example:
Each phrase has lexical splits with no parse information. Output is:
And:
I'm not sure what I'm doing wrong here -- would appreciate any help you can provide.