Coder Social home page Coder Social logo

I can't get ouput! about cfg2cnf HOT 9 OPEN

basemax avatar basemax commented on August 17, 2024 1
I can't get ouput!

from cfg2cnf.

Comments (9)

abolfazlaghdaee avatar abolfazlaghdaee commented on August 17, 2024 1

for example, I input this CFG grammar as Input of the program and I want the program to return me the Chomsky form of the input grammar

this is my input grammar:
S -> SaB | aB
B -> bB

and the output should be :
S -> SD1 | VaB
B -> VbB
D1 ->VaB
Va -> a
Vb -> b
but the program doesnot return anythings

Screenshot (296)

from cfg2cnf.

BaseMax avatar BaseMax commented on August 17, 2024 1

Sorry for the delay, I am on a trip and just arrived at the hotel. This project was for 2-3 years ago and I did not remember it completely. so I just read the source and now I know what is the problem.

In the main.py file, we have not printed the output, so you can print it if you going to save or show it.

In the following screenshot you can see the change I made to print the output:

image

P.S: If you saw any mistake or problem in the output just let me know that input or fix that by sending a Pull request.

Best Wishes,
M.

from cfg2cnf.

mrkingali avatar mrkingali commented on August 17, 2024 1

hello dear basemax
i have same problem
i had call formatter-grammer function
but its note work
could you please tell us the order of use of these function to get real output

from cfg2cnf.

BaseMax avatar BaseMax commented on August 17, 2024

Hello Abolfazl.
I am not sure whether your request is to report a bug, or if it's a help/question.
It will be great if you can provide your sample input and the expected output.

from cfg2cnf.

abolfazlaghdaee avatar abolfazlaghdaee commented on August 17, 2024

Oh thank you for your response.
have a nice trip ✌🏻
سفر سلامت :)

from cfg2cnf.

BaseMax avatar BaseMax commented on August 17, 2024

You are welcome.

New update:
It seems I missed something, for complete working we need to call other functions too.
Such as formatter_grammers

Without them, we cannot get the real final output.

from cfg2cnf.

BaseMax avatar BaseMax commented on August 17, 2024

If you know Python and have time, It will be good to read the source code.
It's not much long. only +100 LOC.

from cfg2cnf.

lcubrilo avatar lcubrilo commented on August 17, 2024

Bruh your main.py does not return any inputs (as others have already said).

for complete working we need to call other functions too

Why not just include all necessary calls in the main?
Since you presented an input and the subsequent output in the readme, then your program should do that out-of-the-box. This isn't IKEA, and even if it was, we didn't get the assembly guide.

from cfg2cnf.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.