rmuir commented on issue #13706:
URL: https://github.com/apache/lucene/issues/13706#issuecomment-2324827442

   @ChrisHegarty  implementation of `isTotal()` method requires a minimal DFA. 
If the automaton is not minimal, it may return false but it should not create a 
problem. 
   
   This is the only place that `isTotal()` is called in lucene (see the 
comment): 
https://github.com/apache/lucene/blob/main/lucene/core/src/java/org/apache/lucene/util/automaton/CompiledAutomaton.java#L181
   
   If you really need to minimize here, can you use something like this as a 
workaround? 
https://github.com/apache/lucene/blob/main/lucene/test-framework/src/java/org/apache/lucene/tests/util/automaton/AutomatonTestUtil.java#L338-L345
   
   Sorry, I havent thought about this `isTotal` much to see if there is a more 
reasonable implementation, just need to think it over.
   
   If we need to improve `isTotal`, it is definitely not necessary to minimize, 
e.g. the following only requires determinization + removal of dead states
   ```
   boolean isTotal(Automaton a) {
     return sameLanguage(a, Automata.makeAnyString());
   }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to